File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,15 @@ jobs:
241241 run : |
242242 mlc pull repo mlcommons@mlperf-automations --checkout=dev
243243
244+ - name : Test for rm cache - invalid cache entry tags(test succeeds if command fails)
245+ run : |
246+ ! mlc rm cache --tags=sample,invalid,tags
247+
248+ - name : Test for rm cache when the cache folder is empty(only for mlc rm cache without specifying particular script)
249+ run : |
250+ mlc rm cache -f
251+ mlc rm cache -f
252+
244253 - name : Run tests from test-mlc-access.py
245254 run : |
246255 cd .github/scripts && python -c "import test_mlc_access as test; test.run_tests()"
Original file line number Diff line number Diff line change @@ -337,7 +337,12 @@ def rm(self, i):
337337 return res
338338
339339 if len (res ['list' ]) == 0 :
340- return {'return' : 16 , 'error' : f'No { target_name } found for { inp } ' }
340+ # Do not error out if fetch_all is used
341+ if inp ["fetch_all" ] == True :
342+ logger .warning (f"{ target_name } is empty! nothing to be cleared!" )
343+ return {"return" : 0 }
344+ else :
345+ return {'return' : 16 , 'error' : f'No { target_name } found for { inp } ' }
341346 elif len (res ['list' ]) > 1 :
342347 logger .info (f"More than 1 { target_name } found for { inp } :" )
343348 if not i .get ('all' ):
You can’t perform that action at this time.
0 commit comments