Lines Matching refs:path

37 D = os.path.dirname(os.path.abspath(__file__))
67 def read_jobs(path): argument
68 return [tuple(l.rstrip("\n").split("\t")) for l in open(path) if l.strip()]
73 return [(src, os.path.join(outdir, os.path.basename(out))) for src, out in jobs]
76 def read_volatile(path=os.path.join(D, "gate-volatile.tsv")): argument
77 …return {l.split("\t")[0]: l.rstrip("\n").split("\t")[1] for l in open(path) if l.strip() and not l…
108 def bridge_dead(path): argument
111 d = json.load(open(path))
122 files = sorted(os.path.join(src, f) for f in os.listdir(src) if not f.startswith("."))
129 if run([os.path.join(D, "start.sh"), profile, str(port)], log) != 0:
132 marker = os.path.join(dest, ".current")
133 …argv = tool(port, dest, files) if tool else [os.path.join(D, "runpy.sh"), os.path.join(D, dumper),…
134 …how, rc = run_with_stall(argv, lambda: (count(), os.path.getmtime(marker) if os.path.exists(marker…
136 cur = open(marker).read().strip() if os.path.exists(marker) else ""
137 if cur and not os.path.exists(os.path.join(dest, os.path.basename(cur) + ".json")):
139 … json.dump({"error": reason}, open(os.path.join(dest, os.path.basename(cur) + ".json"), "w"))
146 … gone = [f for f in os.listdir(dest) if f.endswith(".json") and bridge_dead(os.path.join(dest, f))]
152 os.remove(os.path.join(dest, f))
164 if os.path.exists(done):
174 self.run = os.path.join(D, "runs", "gate-" + a.tag)
176 self.res_path = os.path.join(self.run, "results.json")
177 self.res = json.load(open(self.res_path)) if os.path.exists(self.res_path) else {}
180 self.prev = os.path.abspath(a.prev) if a.prev else None
186 return os.path.join(self.run, name + ".log")
190 p = os.path.join(self.prev, c) if self.prev else None
191 if p and os.path.exists(p):
200 …env = os.environ.get("ODFV_BUILD_ENV") or sorted(__import__("glob").glob(os.path.join(D, "..", "..…
209 … out = subprocess.run([os.path.join(D, "refresh-app.sh")] + libs, capture_output=True, text=True)
218 …out = subprocess.run([os.path.join(D, "make-jobs.sh"), "OUT"], capture_output=True, text=True, che…
225 with open(os.path.join(self.run, "jobs.tsv"), "w") as f:
229 md = os.path.join(self.run, mode)
230 os.makedirs(os.path.join(md, "out"), exist_ok=True)
231 with open(os.path.join(md, "jobs.tsv"), "w") as f:
232 f.writelines("%s\t%s\n" % j for j in rewrite_jobs(jobs, os.path.join(md, "out")))
233 open(os.path.join(md, "done.tsv"), "a").close()
234 …s[mode] = subprocess.Popen([os.path.join(D, "drive.sh"), mode, str(self.a.port + i), os.path.join(…
237 md = os.path.join(self.run, mode)
238 ok, fail = count_done(os.path.join(md, "done.tsv"))
239 …e, "ok": ok, "fail": fail, "jobs": len(jobs), "packages": len(os.listdir(os.path.join(md, "out")))}
273 log = os.path.join(md, "validate.log")
274 run(PY + [os.path.join(D, "validate.py"), out, os.path.join(md, "val.json")], log)
275 val = json.load(open(os.path.join(md, "val.json")))
279 kp = os.path.join(md, "kinds%s.json" % ("" if v == "12" else v))
280 …run(PY + [os.path.join(D, "report.py"), os.path.join(md, "val.json"), kp, v], os.path.join(md, "re…
284 …o = subprocess.run(PY + [os.path.join(D, script), out, os.path.join(md, name + ".json")], capture_…
288 if base and os.path.exists(base):
289 …r["vs_baseline"] = run(PY + [os.path.join(D, "compare.py"), base, os.path.join(md, kinds_file)], o…
295 md = os.path.join(self.run, mode)
298 …r = self.validate_dir(md, os.path.join(md, "out"), os.path.join(D, "baseline", mode + ".kinds.json…
304 …r["vs_prev"] = run(PY + [os.path.join(D, "compare.py"), pk, os.path.join(md, kf)], os.path.join(md…
305 …r["vs_prev_reverse"] = run(PY + [os.path.join(D, "compare.py"), os.path.join(md, kf), pk], os.path…
314 md = os.path.join(self.run, mode)
315 …res[mode] = dump_dir(os.path.join(md, "out"), os.path.join(md, "dump"), "gate_dump_%s_%s" % (self.…
322 md = os.path.join(self.run, mode, "dump")
323 …s"] = sorted(f for f in os.listdir(md) if f.endswith(".json") and bridge_dead(os.path.join(md, f)))
325 … f in os.listdir(md) if f.endswith(".json") and "error" in json.load(open(os.path.join(md, f))) and
326 … str(json.load(open(os.path.join(md, f)))["error"]).startswith(("HANG", "CRASH")))
334 md = os.path.join(self.run, mode)
340 sub = os.path.join(md, "prev-dump")
342 for f in os.listdir(os.path.join(md, "dump")):
343 if f.endswith(".json") and os.path.exists(os.path.join(old, f)):
344 os.symlink(os.path.join(old, f), os.path.join(sub, f))
345 dj = os.path.join(md, "diff_dump.json")
346 …run(PY + [os.path.join(D, "diff7.py"), sub, os.path.join(md, "dump"), dj], os.path.join(md, "diff_…
350 stage = os.path.join(self.run, "cmp-" + mode)
351 shutil.rmtree(stage, ignore_errors=True); os.makedirs(os.path.join(stage, "out"))
352 for f in os.listdir(os.path.join(md, "out")):
353 if os.path.exists(os.path.join(oldrun, f)):
354 os.symlink(os.path.join(oldrun, f), os.path.join(stage, "out", f))
356 cj = os.path.join(md, "cmp7.json")
357 …cp = subprocess.run(PY + [os.path.join(D, "cmp7.py"), stage, md, mode, cj], capture_output=True, t…
358 open(os.path.join(md, "cmp7.log"), "w").write(cp.stdout + cp.stderr)
372 …entries = [l.rstrip("\n").split("\t") for l in open(os.path.join(D, "gate-fixtures.tsv")) if l.str…
374 …return os.path.join(D, "..", "..", "main", s[4:]) if s.startswith("EXT:") else os.path.join(D, "fi…
376 b = os.path.splitext(os.path.basename(s))[0]
383 md = os.path.join(self.run, "fixtures", mode)
384 out = os.path.join(md, "out")
386 missing = [s for s in sources if not os.path.isfile(src_path(s))]
387 with open(os.path.join(md, "jobs.tsv"), "w") as f:
388 …f.writelines("%s\t%s\n" % (os.path.abspath(src_path(s)), os.path.join(out, out_name(s))) for s in …
389 open(os.path.join(md, "done.tsv"), "a").close()
390 …rc = run([os.path.join(D, "drive.sh"), mode, str(self.a.port + 20 + i), os.path.join(md, "jobs.tsv…
391 ok, fail = count_done(os.path.join(md, "done.tsv"))
394 run([os.path.join(D, "start.sh"), prof, str(port)], os.path.join(md, "rt.log"))
396 doc = os.path.join(out, out_name(s))
397 key = "%s|%s" % (os.path.basename(s), ck)
398 if not os.path.isfile(doc):
400 …p = subprocess.run([os.path.join(D, "runpy.sh"), os.path.join(D, "roundtrip.py"), str(port), doc, …