Skip to content

Commit

Permalink
Merge branch 'grarco/prune-tests-from-workflow' (#3295)
Browse files Browse the repository at this point in the history
* origin/grarco/prune-tests-from-workflow:
  Removes old tests from workflows scripts
  • Loading branch information
tzemanovic committed May 24, 2024
2 parents 6dc1612 + 9900a9c commit 5a5838a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
1 change: 0 additions & 1 deletion .github/workflows/scripts/e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"e2e::ledger_tests::test_genesis_validators": 14,
"e2e::ledger_tests::test_node_connectivity_and_consensus": 28,
"e2e::ledger_tests::test_epoch_sleep": 12,
"e2e::ledger_tests::wrapper_disposable_signer": 28,
"e2e::ledger_tests::deactivate_and_reactivate_validator": 67,
"e2e::ledger_tests::test_invalid_validator_txs": 73,
"e2e::ledger_tests::suspend_ledger": 30,
Expand Down
34 changes: 16 additions & 18 deletions .github/workflows/scripts/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
"integration::masp::cross_epoch_unshield",
"integration::masp::dynamic_assets",
"integration::masp::masp_incentives",
"integration::masp::masp_pinned_txs",
"integration::masp::masp_txs_and_queries",
"integration::masp::multiple_unfetched_txs_same_block",
"integration::masp::spend_unconverted_asset_type",
"integration::masp::wrapper_fee_unshielding",
"integration::masp::wrapper_fee_unshielding_out_of_gas",
]

NIGHTLY_VERSION = open("rust-nightly-version", "r").read().strip()
CARGO_TEST_COMMAND = "RUST_BACKTRACE=1 cargo +{} test --lib {} --features integration -Z unstable-options -- --test-threads=1 --exact -Z unstable-options --report-time"
CARGO_TEST_COMMAND = (
"RUST_BACKTRACE=1 cargo +{} test --lib {} --features integration -Z"
" unstable-options -- --test-threads=1 --exact -Z unstable-options --report-time"
)

test_results = {}
has_failures = False
Expand All @@ -27,28 +27,26 @@
start = time.time()
command = CARGO_TEST_COMMAND.format(NIGHTLY_VERSION, task)
end = time.time()
subprocess.check_call(command, shell=True, stdout=sys.stdout, stderr=subprocess.STDOUT)
subprocess.check_call(
command, shell=True, stdout=sys.stdout, stderr=subprocess.STDOUT
)
test_results[task] = {
'status': 'ok',
'time': round(end - start),
'command': command
"status": "ok",
"time": round(end - start),
"command": command,
}
except:
test_results[task] = {
'status': 'fail',
'time': -1,
'command': command
}
test_results[task] = {"status": "fail", "time": -1, "command": command}
has_failures = True
continue

for test_name in test_results.keys():
test_status = test_results[test_name]['status']
time = test_results[test_name]['time']
test_status = test_results[test_name]["status"]
time = test_results[test_name]["time"]
print("- Test {} ({}s) -> status: {}".format(test_name, time, test_status))
if test_results[test_name]['status'] != 'ok':
test_command = test_results[test_name]['command']
if test_results[test_name]["status"] != "ok":
test_command = test_results[test_name]["command"]
print(" Run locally with: {}".format(test_command))

if has_failures:
exit(1)
exit(1)

0 comments on commit 5a5838a

Please sign in to comment.