Skip to content

Commit

Permalink
build: add a testclean target
Browse files Browse the repository at this point in the history
This commit adds a target named testclean to allow for cleaning the
temporary files generated during a test run without having to use the
clean target.

PR-URL: #29094
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
danbev authored and targos committed Aug 19, 2019
1 parent e2a2a3f commit e51f924
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,16 @@ clean: ## Remove build artifacts.
$(RM) -r node_modules
@if [ -d deps/icu ]; then echo deleting deps/icu; $(RM) -r deps/icu; fi
$(RM) test.tap
# Next one is legacy remove this at some point
$(RM) -r test/tmp*
$(RM) -r test/.tmp*
$(MAKE) testclean
$(MAKE) test-addons-clean
$(MAKE) bench-addons-clean

.PHONY: testclean
testclean:
# Next one is legacy remove this at some point
$(RM) -r test/tmp*
$(RM) -r test/.tmp*

.PHONY: distclean
distclean:
$(RM) -r out
Expand Down
8 changes: 8 additions & 0 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ if "%1"=="" goto args-done
if /i "%1"=="debug" set config=Debug&goto arg-ok
if /i "%1"=="release" set config=Release&set ltcg=1&set cctest=1&goto arg-ok
if /i "%1"=="clean" set target=Clean&goto arg-ok
if /i "%1"=="testclean" set target=TestClean&goto arg-ok
if /i "%1"=="ia32" set target_arch=x86&goto arg-ok
if /i "%1"=="x86" set target_arch=x86&goto arg-ok
if /i "%1"=="x64" set target_arch=x64&goto arg-ok
Expand Down Expand Up @@ -200,6 +201,13 @@ if "%target%"=="Clean" echo deleting %~dp0deps\icu
if "%target%"=="Clean" rmdir /S /Q %~dp0deps\icu
:no-depsicu

if "%target%"=="TestClean" (
echo deleting test/.tmp*
if exist "test\.tmp*" for /f %%i in ('dir /a:d /s /b test\.tmp*') do rmdir /S /Q "%%i"
goto exit
)


call tools\msvs\find_python.cmd
if errorlevel 1 goto :exit

Expand Down

0 comments on commit e51f924

Please sign in to comment.