Throw away everything in the go workspace except bin.
Looks like our win bots are having problems with .git files created by
'go get collidermain'. The test only requires the bin/ output, so nuke
everything except that.
BUG=585462
TBR=kjellander@chromium.org
Review URL: https://codereview.chromium.org/1680173002 .
diff --git a/build_apprtc_collider.py b/build_apprtc_collider.py
index f9ce9aa..2758b1f 100755
--- a/build_apprtc_collider.py
+++ b/build_apprtc_collider.py
@@ -13,6 +13,7 @@
import shutil
import subprocess
import sys
+import tempfile
import utils
@@ -40,6 +41,14 @@
subprocess.check_call([golang_path, 'build', 'collidermain'],
env=golang_env)
+ # Delete everything in the workspace except the build artifacts.
+ go_bin_dir = os.path.join(golang_workspace, 'bin')
+ tmp_dir = tempfile.mkdtemp()
+ shutil.move(go_bin_dir, tmp_dir)
+ shutil.rmtree(golang_workspace)
+ shutil.move(os.path.join(tmp_dir, 'bin'), go_bin_dir)
+ os.rmdir(tmp_dir)
+
if __name__ == '__main__':
sys.exit(main())