[PATCH] D66873: [Test][Time profiler] Fix test for python3
This revision was automatically updated to reflect the committed changes. Closed by commit rL370300: [Test][Time profiler] Fix test for python3 (authored by anton-afanasyev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D66873?vs=217613=217780#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66873/new/ https://reviews.llvm.org/D66873 Files: cfe/trunk/test/Driver/check-time-trace-sections.py Index: cfe/trunk/test/Driver/check-time-trace-sections.py === --- cfe/trunk/test/Driver/check-time-trace-sections.py +++ cfe/trunk/test/Driver/check-time-trace-sections.py @@ -12,9 +12,9 @@ return b <= c events = json.loads(sys.stdin.read())["traceEvents"] -codegens = filter(lambda x: x["name"] == "CodeGen Function", events) -frontends = filter(lambda x: x["name"] == "Frontend", events) -backends = filter(lambda x: x["name"] == "Backend", events) +codegens = [event for event in events if event["name"] == "CodeGen Function"] +frontends = [event for event in events if event["name"] == "Frontend"] +backends = [event for event in events if event["name"] == "Backend"] if not all([any([is_inside(codegen, frontend) for frontend in frontends]) for codegen in codegens]): Index: cfe/trunk/test/Driver/check-time-trace-sections.py === --- cfe/trunk/test/Driver/check-time-trace-sections.py +++ cfe/trunk/test/Driver/check-time-trace-sections.py @@ -12,9 +12,9 @@ return b <= c events = json.loads(sys.stdin.read())["traceEvents"] -codegens = filter(lambda x: x["name"] == "CodeGen Function", events) -frontends = filter(lambda x: x["name"] == "Frontend", events) -backends = filter(lambda x: x["name"] == "Backend", events) +codegens = [event for event in events if event["name"] == "CodeGen Function"] +frontends = [event for event in events if event["name"] == "Frontend"] +backends = [event for event in events if event["name"] == "Backend"] if not all([any([is_inside(codegen, frontend) for frontend in frontends]) for codegen in codegens]): ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D66873: [Test][Time profiler] Fix test for python3
nathanchance accepted this revision. nathanchance added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66873/new/ https://reviews.llvm.org/D66873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D66873: [Test][Time profiler] Fix test for python3
anton-afanasyev added a comment. Could you please give LGTM? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66873/new/ https://reviews.llvm.org/D66873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D66873: [Test][Time profiler] Fix test for python3
nathanchance added a comment. The test case passes for me after this, thanks for the fix! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66873/new/ https://reviews.llvm.org/D66873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D66873: [Test][Time profiler] Fix test for python3
anton-afanasyev created this revision. anton-afanasyev added reviewers: mgehre, nathanchance. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix test checking time profiler generates correct tracing json-file. `filter` works differently for python2 and python3, so unifying this. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D66873 Files: clang/test/Driver/check-time-trace-sections.py Index: clang/test/Driver/check-time-trace-sections.py === --- clang/test/Driver/check-time-trace-sections.py +++ clang/test/Driver/check-time-trace-sections.py @@ -12,9 +12,9 @@ return b <= c events = json.loads(sys.stdin.read())["traceEvents"] -codegens = filter(lambda x: x["name"] == "CodeGen Function", events) -frontends = filter(lambda x: x["name"] == "Frontend", events) -backends = filter(lambda x: x["name"] == "Backend", events) +codegens = [event for event in events if event["name"] == "CodeGen Function"] +frontends = [event for event in events if event["name"] == "Frontend"] +backends = [event for event in events if event["name"] == "Backend"] if not all([any([is_inside(codegen, frontend) for frontend in frontends]) for codegen in codegens]): Index: clang/test/Driver/check-time-trace-sections.py === --- clang/test/Driver/check-time-trace-sections.py +++ clang/test/Driver/check-time-trace-sections.py @@ -12,9 +12,9 @@ return b <= c events = json.loads(sys.stdin.read())["traceEvents"] -codegens = filter(lambda x: x["name"] == "CodeGen Function", events) -frontends = filter(lambda x: x["name"] == "Frontend", events) -backends = filter(lambda x: x["name"] == "Backend", events) +codegens = [event for event in events if event["name"] == "CodeGen Function"] +frontends = [event for event in events if event["name"] == "Frontend"] +backends = [event for event in events if event["name"] == "Backend"] if not all([any([is_inside(codegen, frontend) for frontend in frontends]) for codegen in codegens]): ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits