citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

ccitrunrun.sh (1852B)


      1 #!/bin/sh -u
      2 #
      3 # Test that citrun run on itself works and the resulting binaries run.
      4 #
      5 exit 0
      6 if [ `uname` = "OpenBSD" ]; then
      7 	rm -rf /usr/ports/devel/ccitrunrun
      8 	cp -R distrib/openbsd/ccitrunrun /usr/ports/devel/
      9 fi
     10 
     11 . tt/package.subr "devel/ccitrunrun"
     12 plan 13
     13 
     14 enter_tmpdir
     15 
     16 export NO_CHECKSUM=1
     17 pkg_check_deps
     18 pkg_clean
     19 pkg_build
     20 
     21 cat <<EOF > check.good
     22 Summary:
     23         24 Source files used as input
     24          2 Application link commands
     25         14 Rewrite parse warnings
     26         24 Rewrite successes
     27         23 Rewritten source compile successes
     28          1 Rewritten source compile failures
     29 
     30 Totals:
     31       4907 Lines of source code
     32        222 Function definitions
     33        179 If statements
     34         24 For loops
     35          5 While loops
     36          3 Switch statements
     37        100 Return statement values
     38        985 Call expressions
     39      15568 Total statements
     40       1475 Binary operators
     41          5 Errors rewriting source
     42 EOF
     43 pkg_check
     44 
     45 cat <<EOF > tu_list.good
     46 src/demo-atlas.cc 149
     47 src/demo-font.cc 253
     48 src/demo-glstate.cc 153
     49 src/demo-shader.cc 210
     50 src/gl_buffer.cc 192
     51 src/gl_main.cc 216
     52 src/gl_view.cc 526
     53 src/glyphy/glyphy-arcs.cc 321
     54 src/glyphy/glyphy-blob.cc 329
     55 src/glyphy/glyphy-extents.cc 90
     56 src/glyphy/glyphy-outline.cc 328
     57 src/glyphy/glyphy-sdf.cc 92
     58 src/glyphy/glyphy-shaders.cc 40
     59 src/matrix4x4.c 399
     60 src/process_dir.cc 47
     61 src/process_file.cc 177
     62 src/trackball.c 338
     63 EOF
     64 
     65 $workdir/src/ccitrunrun-gl < /dev/null
     66 
     67 ok "is write_tus.pl exit code 0" \
     68 	perl -I$treedir $treedir/tt/write_tus.pl ${CITRUN_PROCDIR}ccitrunrun-gl_*
     69 pkg_check_manifest
     70 
     71 cat <<EOF > tu_list.good
     72 src/inst_action.cc 118
     73 src/inst_frontend.cc 262
     74 src/inst_main.cc 145
     75 src/inst_visitor.cc 188
     76 EOF
     77 
     78 $workdir/src/ccitrunrun-inst
     79 
     80 ok "is write_tus.pl exit code 0" \
     81 	perl -I$treedir $treedir/tt/write_tus.pl ${CITRUN_PROCDIR}ccitrunrun-inst*
     82 pkg_check_manifest
     83 
     84 pkg_clean