From fb261cd9ca07d8f5e26e420a005d4c31eac1191d Mon Sep 17 00:00:00 2001 From: Albert Date: Fri, 30 May 2014 18:11:43 +0200 Subject: [PATCH] Added a warning message to preparetest to notify when file/directory 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@5c495097c4c47f330dd5d2fc1ce865b3a7b64583). --- final_files.fi | 6 +++--- initial_files.fi | 6 +++--- preparetest.py | 4 ++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/final_files.fi b/final_files.fi index 9a38476..4067228 100644 --- a/final_files.fi +++ b/final_files.fi @@ -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 @@ -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 diff --git a/initial_files.fi b/initial_files.fi index 8aca1ed..d3ebb84 100644 --- a/initial_files.fi +++ b/initial_files.fi @@ -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 @@ -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 diff --git a/preparetest.py b/preparetest.py index 31226df..2cfae60 100644 --- a/preparetest.py +++ b/preparetest.py @@ -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)) @@ -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"))