Mercurial > octave
comparison test/mk-bc-overloads-tst.sh @ 30932:3c3abe6dbe58 stable
Don't leak build directories in installed directories (bug #62295).
* test/mk-bc-overloads-tst.sh: Remove absolute output directory from file paths.
Use correct name when referencing itself.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Wed, 13 Apr 2022 13:54:52 +0200 |
parents | 796f54d4ddbf |
children | 597f3ee61a48 |
comparison
equal
deleted
inserted
replaced
30930:f67d2ce5d6d4 | 30932:3c3abe6dbe58 |
---|---|
46 if [ $# -eq 2 ]; then | 46 if [ $# -eq 2 ]; then |
47 output_dir="$1" | 47 output_dir="$1" |
48 shift | 48 shift |
49 case "$1" in | 49 case "$1" in |
50 --list-files) | 50 --list-files) |
51 echo $output_dir/tbcover.m | 51 echo tbcover.m |
52 echo $output_dir/bc-overloads.tst | 52 echo bc-overloads.tst |
53 for class in $CLASSES; do | 53 for class in $CLASSES; do |
54 echo $output_dir/@$class/tbcover.m | 54 echo @$class/tbcover.m |
55 done | 55 done |
56 exit | 56 exit |
57 ;; | 57 ;; |
58 --list-dirs) | 58 --list-dirs) |
59 for class in $CLASSES; do | 59 for class in $CLASSES; do |
60 echo $output_dir/@$class | 60 echo @$class |
61 done | 61 done |
62 exit | 62 exit |
63 ;; | 63 ;; |
64 --list-classes) | 64 --list-classes) |
65 echo $CLASSES | 65 echo $CLASSES |
68 *) | 68 *) |
69 expected_results_file="$1" | 69 expected_results_file="$1" |
70 ;; | 70 ;; |
71 esac | 71 esac |
72 else | 72 else |
73 echo "usage: build-bc-overload-tests.sh output_dir option" 1>&2 | 73 echo "usage: mk-bc-overload-tst.sh output_dir option" 1>&2 |
74 exit 1 | 74 exit 1 |
75 fi | 75 fi |
76 | 76 |
77 for class in $CLASSES; do | 77 for class in $CLASSES; do |
78 DIR="$output_dir/@$class" | 78 DIR="@$class" |
79 test -d $DIR || mkdir $DIR || { echo "error: could not create $DIR"; exit; } | 79 test -d $DIR || mkdir $DIR || { echo "error: could not create $DIR"; exit; } |
80 cat > $DIR/tbcover.m << EOF | 80 cat > $DIR/tbcover.m << EOF |
81 % !!! DO NOT EDIT !!! | 81 % !!! DO NOT EDIT !!! |
82 % generated automatically by build-bc-overload-tests.sh | 82 % generated automatically by mk-bc-overload-tst.sh |
83 function s = tbcover (x, y) | 83 function s = tbcover (x, y) |
84 s = '$class'; | 84 s = '$class'; |
85 EOF | 85 EOF |
86 done | 86 done |
87 | 87 |
88 cat > $output_dir/tbcover.m << EOF | 88 cat > $output_dir/tbcover.m << EOF |
89 % !!! DO NOT EDIT !!! | 89 % !!! DO NOT EDIT !!! |
90 % generated automatically by build-bc-overload-tests.sh | 90 % generated automatically by mk-bc-overload-tst.sh |
91 function s = tbcover (x, y) | 91 function s = tbcover (x, y) |
92 s = 'none'; | 92 s = 'none'; |
93 EOF | 93 EOF |
94 | 94 |
95 if test "$1" = "overloads_only" ; then | 95 if test "$1" = "overloads_only" ; then |