Skip to content
Snippets Groups Projects
Commit f2373ba7 authored by Virgile Prevosto's avatar Virgile Prevosto Committed by Andre Maroneze
Browse files

[tests] avoid leaving generated files in CWD

Notably __fc_machdep.h in result dir, that could be picked up by other
tests in the same session...
parent 3b78bec2
No related branches found
No related tags found
No related merge requests found
/* run.config* /* run.config*
COMMENT: tests that the runtime can compile without errors (for PathCrawler, E-ACSL, ...) COMMENT: tests that the runtime can compile without errors (for PathCrawler, E-ACSL, ...)
CMD: @frama-c@ -print-machdep-header > __fc_machdep.h && gcc -I. -D__FC_MACHDEP_X86_64 @FRAMAC_SHARE@/libc/__fc_runtime.c -Wno-attributes -std=c99 -Wall -Wwrite-strings -o @DEV_NULL@ CMD: FRAMAC='@frama-c@' %{dep:@PTEST_DIR@/runtime.sh}
OPT: OPT: %{dep:@FRAMAC_SHARE@/libc/__fc_runtime.c}
*/ */
int main() { int main() {
......
#!/bin/sh
set -e
if test -z "$FRAMAC"; then echo "variable FRAMAC must be set"; exit 1; fi
TMPDIR=$(mktemp -d fc_test_libc_XXXXXXXX)
$FRAMAC -print-machdep-header > $TMPDIR/__fc_machdep.h
gcc -I$TMPDIR -D__FC_MACHDEP_X86_64 $@ -Wno-attributes -std=c99 -Wall -Wwrite-strings -o /dev/null
rm -fr $TMPDIR
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment