$(CXX) $(CXXOPTS) igr-runner.cc -o igr-runner
clean:
- rm -f igr-runner basic/basic-ran environ/env-record
+ rm -f igr-runner basic/basic-ran environ/env-record ps-environ/env-record
+
int main(int argc, char **argv)
{
- const char * const test_dirs[] = { "basic", "environ" };
+ const char * const test_dirs[] = { "basic", "environ", "ps-environ" };
constexpr int num_tests = sizeof(test_dirs) / sizeof(test_dirs[0]);
int passed = 0;
--- /dev/null
+#!/bin/sh
+
+echo "$TEST_VAR_ONE" >> ./env-record
--- /dev/null
+TEST_VAR_ONE=hello
--- /dev/null
+TEST_VAR_ONE=goodbye
--- /dev/null
+#!/bin/sh
+
+rm -f ./env-record
+
+../../dinit -d sd -u -p socket -q \
+ checkenv1
+
+../../dinit -d sd -u -p socket -q \
+ checkenv2
+
+STATUS=FAIL
+if [ -e env-record ]; then
+ if [ "$(cat env-record)" = "$(echo hello; echo goodbye)" ]; then
+ STATUS=PASS
+ fi
+fi
+
+if [ $STATUS = PASS ]; then exit 0; fi
+exit 1
--- /dev/null
+type = process
+command = ./checkenv.sh
+env-file = ./environment1
--- /dev/null
+type = process
+command = ./checkenv.sh
+env-file = ./environment2