IGCC is a small python wrapper around GCC. https://git.cafkafk.com/cafkafk/igcc
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
506 B

#!/usr/bin/env bash
function test_lib_dir()
{
cd test/cpp && \
g++ -o mylib.o -c mylib.cpp && \
ar rc libmylib.a mylib.o && \
ranlib libmylib.a && \
cd ../.. && \
echo -e '#include "mylib.h"\ndefined_in_cpp();' | ./igcc -Itest/cpp -Ltest/cpp -lmylib | grep "defined_in_cpp saying hello" > /dev/null
RETVAL=$?
if [[ $RETVAL != 0 ]]; then
{
echo "test_lib_dir failed."
exit 1
}; fi
}
test_lib_dir && echo "All slow tests passed." && ./test-igcc