aboutsummaryrefslogtreecommitdiff
path: root/VexRiscv/src/test/python/gcloud/try.py
diff options
context:
space:
mode:
Diffstat (limited to 'VexRiscv/src/test/python/gcloud/try.py')
-rwxr-xr-xVexRiscv/src/test/python/gcloud/try.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/VexRiscv/src/test/python/gcloud/try.py b/VexRiscv/src/test/python/gcloud/try.py
new file mode 100755
index 0000000..650beb4
--- /dev/null
+++ b/VexRiscv/src/test/python/gcloud/try.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+
+from os import system
+from sys import argv
+
+project = "ivory-infusion-209508"
+zone = "europe-west1-b"
+instance = "miaou"
+
+def local(cmd):
+ print(cmd)
+ system(cmd)
+
+def remote(cmd):
+ cmd = 'gcloud compute --project "{}" ssh --zone "{}" "{}" -- "{}"'.format(project, zone, instance, cmd)
+ print(cmd)
+ system(cmd)
+
+def localToRemote(source, target):
+ remote("rm -rf target")
+ cmd = 'gcloud compute --project "{}" scp --zone "{}" {} {}:{}'.format(project, zone, source, instance, target)
+ print(cmd)
+ system(cmd)
+
+#local("sbt test &")
+local("python -c 'from os import system; system(\"(sbt test >> sbtTest.txt) &\")'")
+#python -c 'from os import system; system("sbt test")' &