When a test defines macros as part of compiler_args (e.g to replace a main function) and --generate_expected_output is used, it surrounds the -DFOO with single quotes. This is treated as a syntax error in autotest.
❯ cat autotest/tests.txt
files=test.c
command=./test
compiler_args=-DFOO=1 test.c -o test
1
❯ autotest -g -a autotest
files=test.c
command=./test
compiler_args='-DFOO=1' test.c -o test
1
### generated by: autotest --generate_expected_output - see https://github.com/COMP1511UNSW/autotest
1 expected_stdout='Hello, world!\n'
❯ autotest -g update -a autotest
❯ autotest -a autotest
autotest: /tmp/tmp.ihUpssD2nV/autotest/tests.txt:4: syntax error in assignment
Test specification documentation & source at: https://github.com/COMP1511UNSW/autotest - issues welcome
When a test defines macros as part of
compiler_args(e.g to replace a main function) and--generate_expected_outputis used, it surrounds the-DFOOwith single quotes. This is treated as a syntax error in autotest.