fix build and tests (#5768)

* fix conan.lock

* add conan.lock to triggers

* update on-trigger.yml too

* fix tests

* roll back unrelated changes
This commit is contained in:
Mayukha Vadari
2025-09-04 17:05:39 -04:00
committed by GitHub
parent f3c50318e8
commit a46d772147
4 changed files with 27 additions and 21 deletions

View File

@@ -75,6 +75,7 @@ jobs:
tests/** tests/**
CMakeLists.txt CMakeLists.txt
conanfile.py conanfile.py
conan.lock
- name: Check whether to run - name: Check whether to run
# This step determines whether the rest of the workflow should # This step determines whether the rest of the workflow should
# run. The rest of the workflow will run if this job runs AND at # run. The rest of the workflow will run if this job runs AND at

View File

@@ -32,6 +32,7 @@ on:
- "tests/**" - "tests/**"
- "CMakeLists.txt" - "CMakeLists.txt"
- "conanfile.py" - "conanfile.py"
- "conan.lock"
# Run at 06:32 UTC on every day of the week from Monday through Friday. This # Run at 06:32 UTC on every day of the week from Monday through Friday. This
# will force all dependencies to be rebuilt, which is useful to verify that # will force all dependencies to be rebuilt, which is useful to verify that

View File

@@ -3,6 +3,7 @@
"requires": [ "requires": [
"zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1756234269.497", "zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1756234269.497",
"xxhash/0.8.3#681d36a0a6111fc56e5e45ea182c19cc%1756234289.683", "xxhash/0.8.3#681d36a0a6111fc56e5e45ea182c19cc%1756234289.683",
"wamr/2.4.1#731b101bc8fa06d84e5c84edb4dc41a5%1755280063.774542",
"sqlite3/3.49.1#8631739a4c9b93bd3d6b753bac548a63%1756234266.869", "sqlite3/3.49.1#8631739a4c9b93bd3d6b753bac548a63%1756234266.869",
"soci/4.0.3#a9f8d773cd33e356b5879a4b0564f287%1756234262.318", "soci/4.0.3#a9f8d773cd33e356b5879a4b0564f287%1756234262.318",
"snappy/1.1.10#968fef506ff261592ec30c574d4a7809%1756234314.246", "snappy/1.1.10#968fef506ff261592ec30c574d4a7809%1756234314.246",
@@ -53,4 +54,4 @@
] ]
}, },
"config_requires": [] "config_requires": []
} }

View File

@@ -2040,14 +2040,14 @@ struct Escrow_test : public beast::unit_test::suite
// create escrow // create escrow
env.fund(XRP(5000), alice, carol); env.fund(XRP(5000), alice, carol);
auto const seq = env.seq(alice); auto const seq = env.seq(alice);
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 0); BEAST_EXPECT(env.ownerCount(alice) == 0);
env(escrowCreate, env(escrowCreate,
escrow::finish_function(wasmHex), escrow::finish_function(wasmHex),
escrow::cancel_time(env.now() + 100s), escrow::cancel_time(env.now() + 100s),
fee(createFee)); fee(createFee));
env.close(); env.close();
if (BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 2)) if (BEAST_EXPECT(env.ownerCount(alice) == 2))
{ {
env.require(balance(alice, XRP(4000) - createFee)); env.require(balance(alice, XRP(4000) - createFee));
env.require(balance(carol, XRP(5000))); env.require(balance(carol, XRP(5000)));
@@ -2097,7 +2097,7 @@ struct Escrow_test : public beast::unit_test::suite
txMeta->getFieldI32(sfWasmReturnCode) == 5, txMeta->getFieldI32(sfWasmReturnCode) == 5,
std::to_string(txMeta->getFieldI32(sfWasmReturnCode))); std::to_string(txMeta->getFieldI32(sfWasmReturnCode)));
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 0); BEAST_EXPECT(env.ownerCount(alice) == 0);
} }
} }
@@ -2105,7 +2105,7 @@ struct Escrow_test : public beast::unit_test::suite
// FinishFunction + Condition // FinishFunction + Condition
Env env(*this, features); Env env(*this, features);
env.fund(XRP(5000), alice, carol); env.fund(XRP(5000), alice, carol);
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 0); BEAST_EXPECT(env.ownerCount(alice) == 0);
auto const seq = env.seq(alice); auto const seq = env.seq(alice);
// create escrow // create escrow
env(escrowCreate, env(escrowCreate,
@@ -2117,7 +2117,7 @@ struct Escrow_test : public beast::unit_test::suite
auto const conditionFinishFee = finishFee + auto const conditionFinishFee = finishFee +
env.current()->fees().base * (32 + (escrow::fb1.size() / 16)); env.current()->fees().base * (32 + (escrow::fb1.size() / 16));
if (BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 2)) if (BEAST_EXPECT(env.ownerCount(alice) == 2))
{ {
env.require(balance(alice, XRP(4000) - createFee)); env.require(balance(alice, XRP(4000) - createFee));
env.require(balance(carol, XRP(5000))); env.require(balance(carol, XRP(5000)));
@@ -2168,7 +2168,7 @@ struct Escrow_test : public beast::unit_test::suite
std::to_string(txMeta->getFieldI32(sfWasmReturnCode))); std::to_string(txMeta->getFieldI32(sfWasmReturnCode)));
env.close(); env.close();
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 0); BEAST_EXPECT(env.ownerCount(alice) == 0);
} }
} }
@@ -2178,7 +2178,7 @@ struct Escrow_test : public beast::unit_test::suite
// create escrow // create escrow
env.fund(XRP(5000), alice, carol); env.fund(XRP(5000), alice, carol);
auto const seq = env.seq(alice); auto const seq = env.seq(alice);
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 0); BEAST_EXPECT(env.ownerCount(alice) == 0);
auto const ts = env.now() + 97s; auto const ts = env.now() + 97s;
env(escrowCreate, env(escrowCreate,
escrow::finish_function(wasmHex), escrow::finish_function(wasmHex),
@@ -2187,7 +2187,7 @@ struct Escrow_test : public beast::unit_test::suite
fee(createFee)); fee(createFee));
env.close(); env.close();
if (BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 2)) if (BEAST_EXPECT(env.ownerCount(alice) == 2))
{ {
env.require(balance(alice, XRP(4000) - createFee)); env.require(balance(alice, XRP(4000) - createFee));
env.require(balance(carol, XRP(5000))); env.require(balance(carol, XRP(5000)));
@@ -2218,7 +2218,7 @@ struct Escrow_test : public beast::unit_test::suite
txMeta->getFieldI32(sfWasmReturnCode) == 13, txMeta->getFieldI32(sfWasmReturnCode) == 13,
std::to_string(txMeta->getFieldI32(sfWasmReturnCode))); std::to_string(txMeta->getFieldI32(sfWasmReturnCode)));
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 0); BEAST_EXPECT(env.ownerCount(alice) == 0);
} }
} }
@@ -2228,7 +2228,7 @@ struct Escrow_test : public beast::unit_test::suite
// create escrow // create escrow
env.fund(XRP(5000), alice, carol); env.fund(XRP(5000), alice, carol);
auto const seq = env.seq(alice); auto const seq = env.seq(alice);
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 0); BEAST_EXPECT(env.ownerCount(alice) == 0);
env(escrowCreate, env(escrowCreate,
escrow::finish_function(wasmHex), escrow::finish_function(wasmHex),
escrow::finish_time(env.now() + 2s), escrow::finish_time(env.now() + 2s),
@@ -2236,7 +2236,7 @@ struct Escrow_test : public beast::unit_test::suite
fee(createFee)); fee(createFee));
// Don't close the ledger here // Don't close the ledger here
if (BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 2)) if (BEAST_EXPECT(env.ownerCount(alice) == 2))
{ {
env.require(balance(alice, XRP(4000) - createFee)); env.require(balance(alice, XRP(4000) - createFee));
env.require(balance(carol, XRP(5000))); env.require(balance(carol, XRP(5000)));
@@ -2273,7 +2273,7 @@ struct Escrow_test : public beast::unit_test::suite
std::to_string(txMeta->getFieldI32(sfWasmReturnCode))); std::to_string(txMeta->getFieldI32(sfWasmReturnCode)));
env.close(); env.close();
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 0); BEAST_EXPECT(env.ownerCount(alice) == 0);
} }
} }
} }
@@ -2297,7 +2297,7 @@ struct Escrow_test : public beast::unit_test::suite
// create escrow // create escrow
env.fund(XRP(5000), alice, carol); env.fund(XRP(5000), alice, carol);
auto const seq = env.seq(alice); auto const seq = env.seq(alice);
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 0); BEAST_EXPECT(env.ownerCount(alice) == 0);
auto escrowCreate = escrow::create(alice, carol, XRP(1000)); auto escrowCreate = escrow::create(alice, carol, XRP(1000));
XRPAmount txnFees = XRPAmount txnFees =
env.current()->fees().base * 10 + wasmHex.size() / 2 * 5; env.current()->fees().base * 10 + wasmHex.size() / 2 * 5;
@@ -2310,8 +2310,7 @@ struct Escrow_test : public beast::unit_test::suite
env.close(); env.close();
if (BEAST_EXPECT( if (BEAST_EXPECT(
(*env.le(alice))[sfOwnerCount] == env.ownerCount(alice) == (1 + wasmHex.size() / 2 / 500)))
(1 + wasmHex.size() / 2 / 500)))
{ {
env.require(balance(alice, XRP(4000) - txnFees)); env.require(balance(alice, XRP(4000) - txnFees));
env.require(balance(carol, XRP(5000))); env.require(balance(carol, XRP(5000)));
@@ -2350,7 +2349,7 @@ struct Escrow_test : public beast::unit_test::suite
BEAST_EXPECT(txMeta->getFieldI32(sfWasmReturnCode) == 1); BEAST_EXPECT(txMeta->getFieldI32(sfWasmReturnCode) == 1);
env.close(); env.close();
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 0); BEAST_EXPECT(env.ownerCount(alice) == 0);
} }
} }
} }
@@ -2374,7 +2373,7 @@ struct Escrow_test : public beast::unit_test::suite
env.fund(XRP(10000), alice, carol); env.fund(XRP(10000), alice, carol);
BEAST_EXPECT(env.seq(alice) == 4); BEAST_EXPECT(env.seq(alice) == 4);
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 0); BEAST_EXPECT(env.ownerCount(alice) == 0);
// base objects that need to be created first // base objects that need to be created first
auto const tokenId = auto const tokenId =
@@ -2383,7 +2382,7 @@ struct Escrow_test : public beast::unit_test::suite
env(trust(alice, carol["USD"](1'000'000))); env(trust(alice, carol["USD"](1'000'000)));
env.close(); env.close();
BEAST_EXPECT(env.seq(alice) == 6); BEAST_EXPECT(env.seq(alice) == 6);
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 2); BEAST_EXPECT(env.ownerCount(alice) == 2);
// set up a bunch of objects to check their keylets // set up a bunch of objects to check their keylets
AMM amm(env, carol, XRP(10), carol["USD"](1000)); AMM amm(env, carol, XRP(10), carol["USD"](1000));
@@ -2411,7 +2410,9 @@ struct Escrow_test : public beast::unit_test::suite
env(tx); env(tx);
env.close(); env.close();
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 15); BEAST_EXPECTS(
env.ownerCount(alice) == 16,
std::to_string(env.ownerCount(alice)));
if (BEAST_EXPECTS( if (BEAST_EXPECTS(
env.seq(alice) == 20, std::to_string(env.seq(alice)))) env.seq(alice) == 20, std::to_string(env.seq(alice))))
{ {
@@ -2444,7 +2445,9 @@ struct Escrow_test : public beast::unit_test::suite
BEAST_EXPECTS( BEAST_EXPECTS(
gasUsed == allowance, std::to_string(gasUsed)); gasUsed == allowance, std::to_string(gasUsed));
} }
BEAST_EXPECT((*env.le(alice))[sfOwnerCount] == 15); BEAST_EXPECTS(
env.ownerCount(alice) == 16,
std::to_string(env.ownerCount(alice)));
} }
} }
} }