Skip to content

Commit

Permalink
Fixing github actions tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nishant-sachdeva committed Oct 21, 2023
1 parent f19afc1 commit 55f2cb6
Show file tree
Hide file tree
Showing 128 changed files with 10 additions and 84,613 deletions.
12 changes: 10 additions & 2 deletions Manylinux2014_Compliant_Source/pkg/tests/test_ir2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ def test_fa_p():
full_path = str((TEST_SUITE_DIR / file).resolve()).strip()
output = IR2Vec.generateEmbeddings(full_path, "fa", "p")
p_vectors.append(output["Program_List"])

print(TEST_SUITE_DIR)
p_vectors_oracle = read_p_file(
TEST_SUITE_DIR / "oracle" / f"FA_{SEED_VERSION}" / "ir2vec.txt"
TEST_SUITE_DIR / "oracle" / f"FA_{SEED_VERSION}_p" / "ir2vec.txt"
)
for idx, v in enumerate(p_vectors):
assert v == pytest.approx(p_vectors_oracle[idx], abs=ABS_ACCURACY)
Expand All @@ -69,8 +71,10 @@ def test_sym_p():
full_path = str((TEST_SUITE_DIR / file).resolve()).strip()
output = IR2Vec.generateEmbeddings(full_path, "sym", "p")
p_vectors.append(output["Program_List"])

print(TEST_SUITE_DIR)
p_vectors_oracle = read_p_file(
TEST_SUITE_DIR / "oracle" / f"SYM_{SEED_VERSION}" / "ir2vec.txt"
TEST_SUITE_DIR / "oracle" / f"SYM_{SEED_VERSION}_p" / "ir2vec.txt"
)
for idx, v in enumerate(p_vectors):
assert v == pytest.approx(p_vectors_oracle[idx], abs=ABS_ACCURACY)
Expand All @@ -83,6 +87,8 @@ def test_fa_f():
output = IR2Vec.generateEmbeddings(str(full_path).strip(), "fa", "f")
for fun, vec in output["Function_Dict"].items():
f_vecs[full_path.name.strip()][fun.strip()] = vec

print(TEST_SUITE_DIR)
f_vecs_oracle = read_f_file(
TEST_SUITE_DIR / "oracle" / f"FA_{SEED_VERSION}_f" / "ir2vec.txt"
)
Expand All @@ -100,6 +106,8 @@ def test_sym_f():
output = IR2Vec.generateEmbeddings(str(full_path).strip(), "sym", "f")
for fun, vec in output["Function_Dict"].items():
f_vecs[full_path.name.strip()][fun.strip()] = vec

print(TEST_SUITE_DIR)
f_vecs_oracle = read_f_file(
TEST_SUITE_DIR / "oracle" / f"SYM_{SEED_VERSION}_f" / "ir2vec.txt"
)
Expand Down

This file was deleted.

Loading

0 comments on commit 55f2cb6

Please sign in to comment.