-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7fe269d
commit d7cfe71
Showing
3 changed files
with
17 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,15 @@ | ||
from faasmctl.util.upload import upload_file | ||
from invoke import task | ||
from os import makedirs | ||
from os.path import dirname, exists | ||
from shutil import copyfile | ||
from tasks.env import EXAMPLES_DATA_FILES | ||
|
||
|
||
@task(default=True) | ||
def prepare(ctx): | ||
def upload(ctx): | ||
""" | ||
Prepare data files to test WASM examples | ||
Upload shared files needed to run WASM examples | ||
""" | ||
for p in EXAMPLES_DATA_FILES: | ||
path_src = p[0] | ||
path_dst = p[1] | ||
host_path = p[0] | ||
faasm_path = p[1] | ||
|
||
if not exists(dirname(path_dst)): | ||
makedirs(dirname(path_dst)) | ||
|
||
copyfile(path_src, path_dst) | ||
upload_file(host_path, faasm_path) |
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