Browse Source

unittest clean improved

master
Dirk Alders 3 years ago
parent
commit
2f3de760fc
2 changed files with 4 additions and 18 deletions
  1. 0
    17
      run.py
  2. 4
    1
      scripts/Makefile

+ 0
- 17
run.py View File

@@ -26,14 +26,6 @@ except ImportError:
26 26
 import shutil
27 27
 
28 28
 
29
-ARG_CLEAN = 'clean'
30
-ARG_RUN = 'run'
31
-ARG_FINALISE = 'finalise'
32
-ARG_TEX = 'tex'
33
-ARG_STATUS = 'status'
34
-ARG_COPY = 'copy'
35
-ARG_RELEASE = 'release'
36
-
37 29
 FN_DATA_COLLECTION = 'unittest.json'
38 30
 FN_TEX_REPORT = 'unittest.tex'
39 31
 FN_PDF_REPORT = 'unittest.pdf'
@@ -161,8 +153,6 @@ class coverage_info(list):
161 153
 def unittest(options, args, unittest_folder):
162 154
     if 'release_testcases' in args:
163 155
         unittest_release_testcases(unittest_folder)
164
-    elif 'clean' in args:
165
-        unittest_clean(unittest_folder)
166 156
     elif 'prepare' in args:
167 157
         unittest_prepare(unittest_folder)
168 158
     elif 'testrun' in args:
@@ -190,13 +180,6 @@ def unittest_release_testcases(ut_folder):
190 180
                 fh.write(line + '\n')
191 181
 
192 182
 
193
-def unittest_clean(ut_folder):
194
-    output.print_header('Cleaning up...')
195
-    output.print_action('Testresults from last testrun')
196
-    for fn in os.listdir(testresults_filename(ut_folder, '')):
197
-        remove_file(testresults_filename(ut_folder, fn))
198
-
199
-
200 183
 def unittest_prepare(ut_folder):
201 184
     config = imp.load_source('', jsonlog.get_ut_config(ut_folder))
202 185
     #

+ 4
- 1
scripts/Makefile View File

@@ -34,7 +34,10 @@ smoke: testrun_smoke finalise compile status
34 34
 single: testrun_single finalise compile status
35 35
 
36 36
 clean:
37
-	@$(PYT3_CMD) src/unittest/scripts/unittest.py clean
37
+	@echo "\033[1;33mCleaning up...\e[0m"
38
+	@echo "\e[1m  * Testresults from last testrunx\e[0m"
39
+	@ls testresults | xargs -i echo "    testresults/{}"
40
+	@ls testresults | xargs -i rm -f "testresults/{}"
38 41
 	@echo "\e[1m  * Collected coverage information\e[0m"
39 42
 	@$(COV3_CMD) erase
40 43
 

Loading…
Cancel
Save