Skip to content

Commit

Permalink
Added a warning message to preparetest to notify when file/directory …
Browse files Browse the repository at this point in the history
…wildcards don't cause any copying of files (e.g. because the file is missing or the dir is empty). Furthermore, changed the initial and final files lists to reflect changes in Affix component names (per monzum/affix-repo@5c49509).
  • Loading branch information
aaaaalbert committed May 30, 2014
1 parent 9f016a4 commit fb261cd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions final_files.fi
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ req secureclient.r2py
req restrictions.advertiseserver
req affixstackinterface.r2py
req affix_lock_wrapper.py
req nat_forwarder_common_lib.r2py
req tcp_relay_common_lib.r2py
req opendhtadvertise.r2py
req affix_exceptions.r2py
req baseaffix.r2py
Expand All @@ -207,6 +207,6 @@ req nat_advertisement.r2py
req noopaffix.r2py
req affix_wrapper_lib.r2py
req wrapper.r2py
req natpunchaffix.r2py
req natdecideraffix.r2py
req tcprelayaffix.r2py
req checkprivateipaffix.r2py
req coordinationaffix.r2py
6 changes: 3 additions & 3 deletions initial_files.fi
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ req restrictions.advertiseserver
req advertiseserver_v2.r2py
req repyV1
req encasementlib.r2py
req nat_forwarder_common_lib.r2py
req tcp_relay_common_lib.r2py
req pydes.r2py
req opendhtadvertise.r2py
req librepythread.r2py
Expand Down Expand Up @@ -192,6 +192,6 @@ req affixmisc.r2py
req legacyaffix.r2py
req noopaffix.r2py
req affix_wrapper_lib.r2py
req natpunchaffix.r2py
req natdecideraffix.r2py
req tcprelayaffix.r2py
req checkprivateipaffix.r2py
req coordinationaffix.r2py
4 changes: 4 additions & 0 deletions preparetest.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def copy_to_target(file_expr, target):
file_expr may contain wildcards (shell globs).
"""
files_to_copy = glob.glob(file_expr)
if files_to_copy == []:
print "WARNING: File expression '" + file_expr + "' does not match any files. Maybe the directory is empty, or the file / directory doesn't exist?"

for file_path in files_to_copy:
if os.path.isfile(file_path):
shutil.copyfile(file_path, target + "/" +os.path.basename(file_path))
Expand Down Expand Up @@ -292,6 +295,7 @@ def main():
# Copy the necessary files to the target folder
copy_to_target("affix-repo/affix/*", target_dir)
copy_to_target("affix-repo/affix/affix_components/*", target_dir)
copy_to_target("affix-repo/affix/affix_components/tcp_relay/*", target_dir)
copy_to_target("repy_v2/*", target_dir)
copy_to_target("repy_v2/*", os.path.join(target_dir, "repyV2"))
copy_to_target("repy_v1/*", os.path.join(target_dir, "repyV1"))
Expand Down

0 comments on commit fb261cd

Please sign in to comment.