Skip to content

Commit

Permalink
fixing ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Foo committed Feb 4, 2024
1 parent e021eaf commit fb461ce
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/runTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ jobs:
if: matrix.build_system == '-G Ninja'
uses: seanmiddleditch/gha-setup-ninja@master
- name: CMake configure
run: cmake -B./build -DCMAKE_INSTALL_PREFIX:STRING=./artifacts/ -D BUILD_MT_RRT_SAMPLES=OFF -DBUILD_MT_RRT_TESTS=ON -DENABLE_MT_RRT_TESTS_LOGGING=ON -DCMAKE_CONFIGURATION_TYPES="Release" -DCMAKE_BUILD_TYPE:STRING=Release ${{ matrix.compiler_opt }}
run: cmake -B./build -DCMAKE_INSTALL_PREFIX:STRING=./artifacts/ -D BUILD_MT_RRT_SAMPLES=ON -DBUILD_MT_RRT_TESTS=ON -DCMAKE_CONFIGURATION_TYPES="Release" -DCMAKE_BUILD_TYPE:STRING=Release ${{ matrix.build_system }} ${{ matrix.compiler_opt }}
- name: Build
run: cmake --build ./build --config Release
- name: Install
run: cmake --install ./build --config Release
- name: Tests-show
run: python script/RunTests.py --folder ./artifacts/bin --list
- name: Tests
run: python script/RunTests.py --folder ./artifacts/bin
- uses: actions/upload-artifact@v2
Expand Down
9 changes: 3 additions & 6 deletions script/RunTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ def __str__(self):
def run(self):
failed = []
for name in self.forEachProcess():
print('>>>===========================================================<<<')
print('running {}'.format(name))
print('>>>===========================================================<<<')
completed = subprocess.run(['./{}'.format(name)], cwd=self.folder, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if not completed.returncode == 0:
failed.append(name)
Expand All @@ -29,15 +26,15 @@ def main():
parser = argparse.ArgumentParser()
parser.add_argument('--folder', default=None)
parser.add_argument('--list', action='store_true', default=False)
parser.add_argument('--run', action='store_true', default=False)
args = parser.parse_args()

map = TestMap(args.folder)

if args.list:
print(map)
elif args.run:
map.run()
return

map.run()

if __name__ == '__main__':
main()
8 changes: 3 additions & 5 deletions src/carpet/test/RandomTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,12 @@ using DeterminismTestFixture =
::testing::TestWithParam<std::pair<mt_rrt::Seed, bool>>;

TEST_P(DeterminismTestFixture, check_sampling_determinism) {
auto [seed, multi_generation] = GetParam();

auto epic_maker = [&]() {
std::vector<float> result;
std::unique_ptr<mt_rrt::UniformEngine> engine =
std::make_unique<mt_rrt::UniformEngine>(0, 1.f, seed);
std::make_unique<mt_rrt::UniformEngine>(0, 1.f, GetParam().first);
result = sample(*engine);
if (multi_generation) {
if (GetParam().second) {
for (std::size_t e = 0; e < 2; ++e) {
engine = std::make_unique<mt_rrt::UniformEngine>(*engine);
add(result, sample(*engine));
Expand All @@ -132,7 +130,7 @@ TEST_P(DeterminismTestFixture, check_sampling_determinism) {
}
}

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
DeterminismTests, DeterminismTestFixture,
::testing::Values(std::make_pair(0, false), std::make_pair(10, false),
std::make_pair(100, false), std::make_pair(10000, false),
Expand Down
2 changes: 1 addition & 1 deletion src/multi-threaded/test/MultiThreadedPlannersTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ using MultiThreadedPlannerTestTypes = testing::Types<
Info<MultiAgentPlanner, ExpansionStrategy::Star>

>;
TYPED_TEST_CASE(MultiThreadedPlannerTest, MultiThreadedPlannerTestTypes);
TYPED_TEST_SUITE(MultiThreadedPlannerTest, MultiThreadedPlannerTestTypes);

TYPED_TEST(MultiThreadedPlannerTest, search_one_obstacle) {
using Info = TypeParam;
Expand Down

0 comments on commit fb461ce

Please sign in to comment.