Update skeleton

This commit is contained in:
Jeehoon Kang
2020-05-02 07:52:40 +00:00
parent 3bef06455e
commit f4dc5e426c
11 changed files with 142 additions and 15 deletions

View File

@@ -30,6 +30,7 @@ if
grep 'too many arguments in call' out.txt ||\
grep 'declaration does not declare anything' out.txt ||\
grep 'not equal to a null pointer is always true' out.txt ||\
grep 'empty struct is a GNU extension' out.txt ||\
! gcc -Wall -Wextra -O2 test_reduced.c > outa.txt 2>&1 ||\
grep 'uninitialized' outa.txt ||\
grep 'without a cast' outa.txt ||\
@@ -49,10 +50,16 @@ if
grep 'excess elements in struct initializer' outa.txt ||\
grep 'comparison between pointer and integer' outa.txt ||\
! gcc -O1 test_reduced.c > cc_out1.txt 2>&1 ||\
! gcc -O2 test_reduced.c > cc_out2.txt 2>&1)
! gcc -O2 test_reduced.c > cc_out2.txt 2>&1 ||\
! cargo run --manifest-path $PROJECT_DIR/Cargo.toml --release -- --parse test_reduced.c >/dev/null 2>&1)
then
exit 1
fi
cargo run --manifest-path $PROJECT_DIR/Cargo.toml --release -- --parse test_reduced.c >/dev/null 2>&1 &&\
! cargo run --manifest-path $PROJECT_DIR/Cargo.toml --release --bin fuzz -- $FUZZ_ARG test_reduced.c
cargo run --manifest-path $PROJECT_DIR/Cargo.toml --release --bin fuzz -- $FUZZ_ARG test_reduced.c
if [ "$?" = 101 ]
then
exit 0
else
exit 1
fi

View File

@@ -83,3 +83,12 @@ fn test_examples_mem2reg() {
&mut Mem2reg::default(),
);
}
#[test]
fn test_examples_gvn() {
test_opt(
&Path::new("examples/gvn/gvn.input.ir"),
&Path::new("examples/gvn/gvn.output.ir"),
&mut Gvn::default(),
);
}