|
46 | 46 | args = parser.parse_args() |
47 | 47 | configs = args.configs |
48 | 48 | branch = args.branch |
49 | | -result_location = os.path.abspath(args.output) if args.output else '' |
| 49 | +noSync = args.noSync |
| 50 | +isWin = os.name == 'nt' |
| 51 | +# result location can be on a remote server, do NOT use os.path.abspath on it if the system is not Windows or if --noSync=True |
| 52 | +result_location = '' |
| 53 | +if not isWin and not noSync: |
| 54 | + result_location = args.output if args.output else '' |
| 55 | +else: |
| 56 | + result_location = os.path.abspath(args.output) if args.output else '' |
50 | 57 | n_jobs = int(args.jobs) |
51 | 58 | clean = not args.noclean |
52 | 59 | verbose = args.verbose |
|
57 | 64 | allTestsFmi = args.fmi |
58 | 65 | ulimitMemory = args.ulimitvmem |
59 | 66 | docker = args.docker |
60 | | -isWin = os.name == 'nt' |
| 67 | + |
61 | 68 | if args.libraries: |
62 | 69 | librariespath = os.path.abspath(os.path.normpath(args.libraries)) |
63 | 70 | else: |
|
67 | 74 | librariespath = os.path.normpath(os.path.join(os.environ.get('HOME'), '.openmodelica', 'libraries')) |
68 | 75 | overrideDefaults = [arg.split("=", 1) for arg in args.default] |
69 | 76 | execAllTests = args.execAllTests |
70 | | -noSync = args.noSync |
71 | 77 | msysEnvironment = args.msysEnvironment |
72 | 78 |
|
73 | 79 | exeExt = ".exe" if isWin else "" |
@@ -125,7 +131,7 @@ def target(): |
125 | 131 | thread.join() |
126 | 132 |
|
127 | 133 | if clean: |
128 | | - print("---> try clean") |
| 134 | + # print("---> try clean") |
129 | 135 | try: |
130 | 136 | lines = open("%s.tmpfiles" % prefix).readlines() |
131 | 137 | except: |
@@ -863,8 +869,8 @@ def cpu_name(): |
863 | 869 | sysInfo = "%s, %d GB RAM, %s%s" % (cpu_name(), int(math.ceil(psutil.virtual_memory().total / (1024.0**3))), ("Docker " + docker + " ") if docker else "", lsb_release) |
864 | 870 |
|
865 | 871 | # create target dir to move results without sync operations (win or when --noSync is used) |
866 | | -resRootPath = os.path.join(result_location, branch) |
867 | 872 | if result_location != "" and (isWin or noSync): |
| 873 | + resRootPath = os.path.join(result_location, branch) |
868 | 874 | if os.path.exists(resRootPath): |
869 | 875 | rmtree(resRootPath) |
870 | 876 | os.mkdir(resRootPath) |
@@ -987,6 +993,8 @@ def cpu_name(): |
987 | 993 | subprocess.check_output(["rsync", "-aR", "--delete-excluded", "--include-from=%s.files" % libname, "--exclude=*", "./", result_location_libname]) |
988 | 994 | if (conf.get("referenceFiles") or "") != "": |
989 | 995 | subprocess.check_output(["rsync", "-a", dygraphs, result_location_libname+"/files"]) |
| 996 | + else: |
| 997 | + print("No Sync: result_location [%s] != "" and not isWin [%s] and not noSync [%s] : library: %s" % (result_location, isWin, noSync, libname)) |
990 | 998 |
|
991 | 999 | # move results without sync operations (win or when --noSync is used) |
992 | 1000 | if result_location != "" and (isWin or noSync): |
|
0 commit comments