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.
 
 
 
 
 
 

44 lines
873 B

  1. #!/bin/sh
  2. usage() {
  3. echo >&2 "Usage run-test.sh [-v|--verbose] <test_js>..."
  4. exit 1
  5. }
  6. tests=
  7. verbose=false
  8. debug=
  9. for arg in $@ ; do
  10. case $arg in
  11. -g|--debug)
  12. debug="libtool --mode=execute gdb --args"
  13. ;;
  14. -v|--verbose)
  15. verbose=true
  16. ;;
  17. -*)
  18. usage
  19. ;;
  20. *)
  21. tests="$tests $arg"
  22. ;;
  23. esac
  24. done
  25. builddir=`dirname $0`
  26. builddir=`cd $builddir && pwd`
  27. srcdir=$builddir/@srcdir@
  28. srcdir=`cd $srcdir && pwd`
  29. GI_TYPELIB_PATH="$GI_TYPELIB_PATH${GI_TYPELIB_PATH:+:}@MUFFIN_TYPELIB_DIR@:$builddir/../src"
  30. GJS_PATH="$srcdir:$srcdir/../js"
  31. GJS_DEBUG_OUTPUT=stderr
  32. $verbose || GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
  33. CINNAMON_TESTSDIR="$srcdir/"
  34. export GI_TYPELIB_PATH GJS_PATH GJS_DEBUG_OUTPUT GJS_DEBUG_TOPICS CINNAMON_JS CINNAMON_TESTSDIR LD_PRELOAD
  35. for test in $tests ; do
  36. $debug $builddir/../src/run-js-test $test || exit $?
  37. done