/src/tests/cptests/cptests
/src/tests/cptests/corpus
/src/tests/cptests/fuzz
-/src/igr-tests/basic/basic-ran
-/src/igr-tests/environ/env-record
/src/igr-tests/igr-runner
/mconfig
+
+# Integration test output:
+/src/igr-tests/basic/basic-ran
+/src/igr-tests/environ/env-record
+/src/igr-tests/ps-environ/env-record
+/src/igr-tests/chain-to/recorded-output
$(CXX) $(CXXOPTS) igr-runner.cc -o igr-runner
clean:
- rm -f igr-runner basic/basic-ran environ/env-record ps-environ/env-record
-
+ rm -f igr-runner basic/basic-ran environ/env-record ps-environ/env-record chain-to/recorded-output
--- /dev/null
+#!/bin/sh
+# append parameter to file
+
+echo "$1" >> ./recorded-output
--- /dev/null
+#!/bin/sh
+
+rm -f ./recorded-output
+
+../../dinit -d sd -u -p socket -q \
+ part1
+
+STATUS=FAIL
+if [ -e recorded-output ]; then
+ if [ "$(cat recorded-output)" = "$(echo part1; echo part2; echo part3)" ]; then
+ STATUS=PASS
+ fi
+fi
+
+if [ $STATUS = PASS ]; then exit 0; fi
+exit 1
--- /dev/null
+type = process
+command = ./record-param.sh part1
+chain-to = part2
--- /dev/null
+type = process
+command = ./record-param.sh part2
+chain-to = part3
--- /dev/null
+type = process
+command = ./record-param.sh part3
int main(int argc, char **argv)
{
- const char * const test_dirs[] = { "basic", "environ", "ps-environ" };
+ const char * const test_dirs[] = { "basic", "environ", "ps-environ", "chain-to" };
constexpr int num_tests = sizeof(test_dirs) / sizeof(test_dirs[0]);
int passed = 0;