diff options
author | Friedrich Beckmann <friedrich.beckmann@hs-augsburg.de> | 2022-07-25 17:55:39 +0200 |
---|---|---|
committer | Friedrich Beckmann <friedrich.beckmann@hs-augsburg.de> | 2022-07-25 17:55:39 +0200 |
commit | 3fff6023602822531efdae30bc8ebf862967f1ef (patch) | |
tree | 16028102b8d850f8ab3115d28a8539ca6bc5f51d /VexRiscv/src/test/python/gcloud/try.py |
Initial Commit
Diffstat (limited to 'VexRiscv/src/test/python/gcloud/try.py')
-rwxr-xr-x | VexRiscv/src/test/python/gcloud/try.py | 27 |
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")' & |