From d2cc0c0218ab1b6247877a34f3fea504e7865d6f Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 3 Mar 2022 11:26:30 +0100 Subject: Add end-to-end test executing compiled binaries Add a test that compiles many C binaries and runs them. The main purpose of the test is to detect any race conditions in this scenario. --- test/end-to-end/generated-binary/compiled.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 test/end-to-end/generated-binary/compiled.sh (limited to 'test/end-to-end/generated-binary/compiled.sh') diff --git a/test/end-to-end/generated-binary/compiled.sh b/test/end-to-end/generated-binary/compiled.sh new file mode 100755 index 00000000..572e8187 --- /dev/null +++ b/test/end-to-end/generated-binary/compiled.sh @@ -0,0 +1,23 @@ +#!/bin/sh +set -e + +mkdir .tool-root +touch ROOT +cat > TARGETS <<'EOI' +{ "program outputs": {"type": "generated files", "width": ["16"]} +, "ALL": + { "type": "generic" + , "outs": ["out.txt"] + , "cmds": ["cat $(ls out-*.txt | sort) > out.txt"] + , "deps": ["program outputs"] + } +} +EOI + +echo +echo "Analysing" +bin/tool-under-test analyse --dump_graph graph.json 2>&1 + +echo +echo "Building" +bin/tool-under-test install -o out --local_build_root .tool-root -J 16 2>&1 -- cgit v1.2.3