File: try

package info (click to toggle)
gnudatalanguage 0.9.9-13
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 17,892 kB
  • sloc: cpp: 167,389; ansic: 9,358; sh: 566; python: 472; makefile: 252; f90: 28
file content (23 lines) | stat: -rwxr-xr-x 1,076 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

# expected arguments (passed by make to this script):
# - argument $1 should point to $(top_srcdir) 
# - argument $2 should be the name of the .pro file to be executed (with leading /)
# both conditions are ensured in Makefile.am

# expected contents/behaviour of the GDL file:
# - the script to be tried shoud exit with a non-zero status if failed
#   (if the scripts exits with status 77, automake will ignore the failure)
# - the file should contain a procedure named in accordance with the
#   file name, e.g. test_wavelet in test_wavelet.pro
# - the procedure should not need any arguments/keywords

# a quick & dirty way of making the "checks" script work
#test "x$2" = "x./checks" && exit
test "x$3" = "x./checks" && exit

echo "exit,status=1" | \
#  IDL_PATH="" IDL_STARTUP="" GDL_STARTUP="" GDL_PATH=+$1/src/pro:$1/testsuite \
#  $1/src/gdl -quiet -e `echo $2 | cut -d/ -f2 | cut -d. -f1` &> /dev/null
IDL_PATH="" IDL_STARTUP="" GDL_STARTUP="" GDL_PATH=+$2/src/pro:$1/testsuite \
  $2/src/gdl -quiet -e `echo $2 | cut -d/ -f2 | cut -d. -f1` &> /dev/null