-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add windows support to golem tests. (#192)
- Loading branch information
Showing
8 changed files
with
44 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
echo hello from an embedded shell script |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
assets.copy("exec_script/hello_word.sh","/tmp/abcd") | ||
print(sys.shell("chmod +x /tmp/abcd && /tmp/abcd")) | ||
def copy_script_and_execute(): | ||
if sys.is_linux() or sys.is_macos(): | ||
assets.copy("exec_script/hello_world.sh","/tmp/golem_cli_test-copy_script_and_execute") | ||
shell_res = sys.shell("chmod +x /tmp/golem_cli_test-copy_script_and_execute && /tmp/golem_cli_test-copy_script_and_execute") | ||
print(shell_res) | ||
elif sys.is_windows(): | ||
assets.copy("exec_script/hello_world.bat","C:\Windows\Temp\golem_cli_test-copy_script_and_execute") | ||
shell_res = sys.shell("C:\Windows\Temp\golem_cli_test-copy_script_and_execute") | ||
print(shell_res) | ||
|
||
|
||
copy_script_and_execute() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
file.download("https://github.com/KCarretto/realm/releases/download/v0.0.1/imix-linux-x64","abc") | ||
print("OKAY!") | ||
def download_stuff_test(): | ||
dest_path = "Fail" | ||
if sys.is_linux() or sys.is_macos(): | ||
dest_path = "/tmp/golem_cli_test-download_test_dest" | ||
elif sys.is_windows(): | ||
dest_path = "C:\Windows\Temp\golem_cli_test-download_test_dest" | ||
else: | ||
print("Failure - OS not supported") | ||
return -1 | ||
|
||
file.download("https://github.com/KCarretto/realm/releases/download/v0.0.1/imix-linux-x64",dest_path) | ||
print("OKAY!") | ||
return 0 | ||
|
||
download_stuff_test() |