Commit 4cd101438c5d97152dea7c19a05e12c1a51d295c
1 parent
0ab3b3fd
copy all .par files into local pfiles directory
Showing
2 changed files
with
13 additions
and
10 deletions
test/test_ctatools.sh
| ... | ... | @@ -2,11 +2,6 @@ |
| 2 | 2 | # |
| 3 | 3 | # ctatools test script |
| 4 | 4 | # ==================================================================== |
| 5 | -PFILES=$PWD/../src/ctobssim | |
| 6 | -PFILES=$PWD/../src/ctbin:$PFILES | |
| 7 | -PFILES=$PWD/../src/ctselect:$PFILES | |
| 8 | -PFILES=$PWD/../src/ctlike:$PFILES | |
| 9 | -export PFILES | |
| 10 | 5 | |
| 11 | 6 | # |
| 12 | 7 | # Print Header |
| ... | ... | @@ -23,6 +18,13 @@ rm -rf *.fits *.log *.xml |
| 23 | 18 | |
| 24 | 19 | |
| 25 | 20 | # |
| 21 | +# Creates pfiles directory | |
| 22 | +# ======================== | |
| 23 | +mkdir -p pfiles | |
| 24 | +cp -r ../src/*/*.par pfiles/ | |
| 25 | +export PFILES=pfiles | |
| 26 | + | |
| 27 | +# | |
| 26 | 28 | # Test ctobssim |
| 27 | 29 | # ============ |
| 28 | 30 | echo -n "Test ctobssim: " | ... | ... |
test/test_python.py
| ... | ... | @@ -169,11 +169,12 @@ if __name__ == '__main__': |
| 169 | 169 | print "************************************" |
| 170 | 170 | |
| 171 | 171 | # Set PFILES environment variable |
| 172 | - pfiles = "../src/ctobssim:" | |
| 173 | - pfiles += "../src/ctbin:" | |
| 174 | - pfiles += "../src/ctselect:" | |
| 175 | - pfiles += "../src/ctlike:" | |
| 176 | - os.environ['PFILES'] = pfiles | |
| 172 | + try: | |
| 173 | + os.mkdir("pfiles") | |
| 174 | + except: | |
| 175 | + pass | |
| 176 | + os.system("cp -r ../src/*/*.par pfiles/") | |
| 177 | + os.environ['PFILES'] = "pfiles" | |
| 177 | 178 | |
| 178 | 179 | # Remove any existing result files |
| 179 | 180 | list = [glob.glob("*.fits"), glob.glob("*.log"), glob.glob("*.xml")] | ... | ... |