-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrunTest.sh
78 lines (57 loc) · 1.73 KB
/
runTest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# written: fmk 11/24
#
# Function to run a Python script and check if it was successful
#
# Initialize a counter variable
counter=1
run_python_script() {
script_name=$1
shift # Remove the first argument so "$@" contains only the arguments for the Python script
echo "Running $script_name with arguments: $@"
stdout_log="output_${counter}.out"
stderr_log="error_${counter}.out"
python3 "$script_name" "$@" >"$stdout_log" 2>"$stderr_log"
if [ $? -ne 0 ]; then
echo "ERROR: $script_name $@ STD_ERROR saved in $stderr_log file"
else
echo "SUCCESS: $script_name $@."
fi
# Increment the counter for the next script
((counter++))
}
#
# add now run through the tests
#
cd examples
echo "TESTING IMPORTER"
cd importer
run_python_script classic.py OSM_FootprintScraper "Tiburon, CA"
run_python_script importer.py OSM_FootprintScraper "Tiburon, CA"
cd ..
echo "TESTING FOOTPRINT"
cd footprint
run_python_script brails_footprint.py "Tiburon, CA"
cd ..
echo "TESTING IMAGE_DOWNLOADS"
cd image_downloads
run_python_script brails_download_images.py OSM_FootprintScraper "Tiburon, CA" > runTest.out
cd ..
echo "TESTING NSI_INTEGRATION"
cd nsi_integration
run_python_script brails_nsi.py OSM_FootprintScraper "Tiburon, CA"
run_python_script brails_nsi.py USA_FootprintScraper "Tiburon, CA"
cd ..
echo "TESTING FILTERS"
cd image_filters
run_python_script brails_filters.py OSM_FootprintScraper "Tiburon, CA"
cd ..
echo "TESTING PROCESSORS"
cd image_processor
run_python_script brails_classifier.py USA_FootprintScraper "Larkspur, CA" NFloorDetector
cd ..
echo "TESTING IMPUTATION"
cd imputation
run_python_script imputation.py OSM_FootprintScraper "Tiburon, CA"
cd ..
cd ..