You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added: Add testing framework via tests/termux-exec-tests.in and re-add some tests initially added in 5ea25ee and removed in xxxxx
- Move unit tests from `src/termux-exec.c` to `tests/TermuxExecUnitTests.c` since tests shouldn't be in source files.
- Added testing framework via `tests/termux-exec-tests.in` and `lib/termux-exec_c/tests/libtermux-exec_c_tests.in` that calls `termux-exec/lib/termux-exec_c/tests/src/libtermux-exec_c_unit-binary-tests.c` to run unit tests, and `lib/termux-exec_c/tests/src/libtermux-exec_c_runtime-binary-tests.c` and `lib/termux-exec_c/tests/scripts/libtermux-exec_c_runtime-script-tests.in` for runtime tests. Old tests files in random places have been removed. The entire `exec()` family of functions is also tested by `lib/termux-exec_c/tests/src/termux/api/termux_exec/exec/ExecIntercept_RuntimeBinaryTests.c`. Docs will be added in a later commit.Tests can be run with `"${TERMUX__PREFIX:-$PREFIX}/libexec/installed-tests/termux-exec/termux-exec-tests -vv all"`.
.PHONY: all pre-build build-libtermux-exec_c build-libtermux-exec-ld-preload clean install uninstall packaging-debian-build format check
473
+
.PHONY: all pre-build build-libtermux-exec_c build-libtermux-exec_c_runtime-binary-tests build-libtermux-exec-ld-preload clean install uninstall packaging-debian-build test test-unit test-runtime format check
Copy file name to clipboardExpand all lines: lib/termux-exec_c/include/termux/termux_exec__c/v1/termux/shell/command/environment/termux_exec/TermuxExecShellEnvironment.h
+41Lines changed: 41 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,36 @@ static const int E_DEF_VAL__TERMUX_EXEC__SYSTEM_LINKER_EXEC = 1;
81
81
82
82
83
83
84
+
/*
85
+
* Environment for `termux-exec-tests`.
86
+
*/
87
+
88
+
/**
89
+
* Environment variable for the log level for `termux-exec-tests`.
90
+
*
91
+
* Type: `int`
92
+
* Default key: `TERMUX_EXEC__TESTS__LOG_LEVEL`
93
+
* Default value: DEFAULT_LOG_LEVEL
94
+
* Values:
95
+
* - `0` (`OFF`) - Log nothing.
96
+
* - `1` (`NORMAL`) - Log error, warn and info messages and stacktraces.
0 commit comments