From bc1b5a01fc226f69a88b3c4dbb5d21460dabeaa0 Mon Sep 17 00:00:00 2001 From: Benjamin Morgan Date: Tue, 14 May 2024 10:51:41 +0200 Subject: [PATCH] fixup! tooling: Make cloe a super-build of all packages --- tests/test_engine.bats | 6 +- tests/test_engine_json_schema.json | 481 ++++++++++++++++++++++++++++- tests/test_esmini.bats | 6 +- 3 files changed, 483 insertions(+), 10 deletions(-) diff --git a/tests/test_engine.bats b/tests/test_engine.bats index 5b649f43d..1f1640387 100755 --- a/tests/test_engine.bats +++ b/tests/test_engine.bats @@ -148,8 +148,10 @@ load setup_testname } @test "$(testname 'Expect check failure' 'test_engine_unavailable_*.json' '6cf4ded3-8a57-4dee-afac-bb03a8068e41')" { - run cloe-engine -l info check -d test_engine_unavailable_*.json - test $status -eq $CLOE_EXIT_UNKNOWN + for file in test_engine_unavailable_*.json; do + run cloe-engine -l info check "$file" + test $status -eq $CLOE_EXIT_UNKNOWN + done } @test "$(testname 'Expect check failure' 'test_engine_include_nonexistent.json' 'bad115cc-0397-48e6-9a51-bdcfeaf6b024')" { diff --git a/tests/test_engine_json_schema.json b/tests/test_engine_json_schema.json index 869b3ebf5..ab0f5bffc 100644 --- a/tests/test_engine_json_schema.json +++ b/tests/test_engine_json_schema.json @@ -1142,12 +1142,164 @@ "args": { "additionalProperties": false, "properties": { + "headless": { + "description": "run esmini without viewer", + "type": "boolean" + }, + "scenario": { + "description": "absolute path to open scenario file", + "type": "string" + }, "vehicles": { - "description": "list of vehicle names to make available", - "items": { - "type": "string" + "additionalProperties": { + "additionalProperties": false, + "properties": { + "closed_loop": { + "description": "control the esmini vehicle", + "type": "boolean" + }, + "filter_distance": { + "description": "filter distance for ground truth data", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + } + }, + "type": "object" }, - "type": "array" + "description": "vehicle configuration like sensors and component mapping", + "type": "object" + }, + "write_images": { + "description": "save an image for each step", + "type": "boolean" + } + }, + "type": "object" + }, + "binding": { + "const": "esmini", + "description": "name of factory" + }, + "name": { + "description": "globally unique identifier for simulator", + "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$", + "type": "string" + } + }, + "required": [ + "binding" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "args": { + "additionalProperties": false, + "properties": { + "vehicles": { + "additionalProperties": { + "additionalProperties": false, + "properties": { + "ego_sensor_mockup": { + "additionalProperties": false, + "description": "Ego sensor mockup configuration", + "properties": { + "ego_object": { + "additionalProperties": false, + "description": "Ego object configuration in world coordinates", + "properties": { + "position": { + "additionalProperties": false, + "description": "Object position coordinates (x,y,z)", + "properties": { + "x": { + "description": "Object position x axis", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "y": { + "description": "Object position y axis", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "z": { + "description": "Object position z axis", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + } + }, + "type": "object" + }, + "velocity": { + "description": "Object longitudinal velocity", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "object_sensor_mockup": { + "additionalProperties": false, + "description": "Object sensor mockup configuration", + "properties": { + "objects": { + "description": "Array of object configuration relative to ego vehicle", + "items": { + "additionalProperties": false, + "properties": { + "position": { + "additionalProperties": false, + "description": "Object position coordinates (x,y,z)", + "properties": { + "x": { + "description": "Object position x axis", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "y": { + "description": "Object position y axis", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "z": { + "description": "Object position z axis", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + } + }, + "type": "object" + }, + "velocity": { + "description": "Object longitudinal velocity", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "description": "list of vehicle names to make available", + "type": "object" } }, "type": "object" @@ -1311,6 +1463,327 @@ "components": { "additionalProperties": { "oneOf": [ + { + "additionalProperties": false, + "properties": { + "args": { + "additionalProperties": false, + "properties": { + "enable": { + "description": "enable or disable component", + "type": "boolean" + }, + "frustum_culling": { + "description": "enable or disable frustum culling", + "type": "boolean" + } + }, + "type": "object" + }, + "binding": { + "const": "clothoid_fit", + "description": "name of factory" + }, + "from": { + "anyOf": [ + { + "description": "component input for binding", + "type": "string" + }, + { + "description": "component inputs for binding", + "items": { + "type": "string" + }, + "type": "array" + } + ] + }, + "name": { + "description": "globally unique identifier for component", + "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$", + "type": "string" + } + }, + "required": [ + "binding" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "args": { + "additionalProperties": false, + "properties": { + "frustum": { + "additionalProperties": false, + "description": "sensor frustum", + "properties": { + "clip_far": { + "description": "far clipping plane [m]", + "maximum": 1.7976931348623157e+308, + "minimum": 0.0, + "type": "number" + }, + "clip_near": { + "description": "near clipping plane [m]", + "maximum": 1.7976931348623157e+308, + "minimum": 0.0, + "type": "number" + }, + "fov_h": { + "description": "horizontal field of view [rad]", + "maximum": 6.283185307179586, + "minimum": 0.0, + "type": "number" + }, + "fov_v": { + "description": "vertical field of view [rad]", + "maximum": 6.283185307179586, + "minimum": 0.0, + "type": "number" + }, + "offset_h": { + "description": "horizontal field-of-view offset [rad]", + "maximum": 6.283185307179586, + "minimum": -6.283185307179586, + "type": "number" + }, + "offset_v": { + "description": "vertical field-of-view offset [rad]", + "maximum": 6.283185307179586, + "minimum": -6.283185307179586, + "type": "number" + } + }, + "type": "object" + }, + "reference_frame": { + "additionalProperties": false, + "description": "sensor frame of reference", + "properties": { + "pitch": { + "description": "pitch angle relative to ego reference frame [rad]", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "roll": { + "description": "roll angle relative to ego reference frame [rad]", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "x": { + "description": "x-position in ego reference frame [m]", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "y": { + "description": "y-position in ego reference frame [m]", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "yaw": { + "description": "yaw angle relative to ego reference frame [rad]", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "z": { + "description": "z-position in ego reference frame [m]", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + } + }, + "required": [ + "x", + "y", + "z", + "roll", + "pitch", + "yaw" + ], + "type": "object" + } + }, + "required": [ + "reference_frame", + "frustum" + ], + "type": "object" + }, + "binding": { + "const": "frustum_culling_lanes", + "description": "name of factory" + }, + "from": { + "anyOf": [ + { + "description": "component input for binding", + "type": "string" + }, + { + "description": "component inputs for binding", + "items": { + "type": "string" + }, + "type": "array" + } + ] + }, + "name": { + "description": "globally unique identifier for component", + "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$", + "type": "string" + } + }, + "required": [ + "binding" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "args": { + "additionalProperties": false, + "properties": { + "frustum": { + "additionalProperties": false, + "description": "sensor frustum", + "properties": { + "clip_far": { + "description": "far clipping plane [m]", + "maximum": 1.7976931348623157e+308, + "minimum": 0.0, + "type": "number" + }, + "clip_near": { + "description": "near clipping plane [m]", + "maximum": 1.7976931348623157e+308, + "minimum": 0.0, + "type": "number" + }, + "fov_h": { + "description": "horizontal field of view [rad]", + "maximum": 6.283185307179586, + "minimum": 0.0, + "type": "number" + }, + "fov_v": { + "description": "vertical field of view [rad]", + "maximum": 6.283185307179586, + "minimum": 0.0, + "type": "number" + }, + "offset_h": { + "description": "horizontal field-of-view offset [rad]", + "maximum": 6.283185307179586, + "minimum": -6.283185307179586, + "type": "number" + }, + "offset_v": { + "description": "vertical field-of-view offset [rad]", + "maximum": 6.283185307179586, + "minimum": -6.283185307179586, + "type": "number" + } + }, + "type": "object" + }, + "reference_frame": { + "additionalProperties": false, + "description": "sensor frame of reference", + "properties": { + "pitch": { + "description": "pitch angle relative to ego reference frame [rad]", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "roll": { + "description": "roll angle relative to ego reference frame [rad]", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "x": { + "description": "x-position in ego reference frame [m]", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "y": { + "description": "y-position in ego reference frame [m]", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "yaw": { + "description": "yaw angle relative to ego reference frame [rad]", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + }, + "z": { + "description": "z-position in ego reference frame [m]", + "maximum": 1.7976931348623157e+308, + "minimum": -1.7976931348623157e+308, + "type": "number" + } + }, + "required": [ + "x", + "y", + "z", + "roll", + "pitch", + "yaw" + ], + "type": "object" + } + }, + "required": [ + "reference_frame", + "frustum" + ], + "type": "object" + }, + "binding": { + "const": "frustum_culling_objects", + "description": "name of factory" + }, + "from": { + "anyOf": [ + { + "description": "component input for binding", + "type": "string" + }, + { + "description": "component inputs for binding", + "items": { + "type": "string" + }, + "type": "array" + } + ] + }, + "name": { + "description": "globally unique identifier for component", + "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$", + "type": "string" + } + }, + "required": [ + "binding" + ], + "type": "object" + }, { "additionalProperties": false, "properties": { diff --git a/tests/test_esmini.bats b/tests/test_esmini.bats index 2fa1fc4a5..64fcc8cca 100755 --- a/tests/test_esmini.bats +++ b/tests/test_esmini.bats @@ -1,9 +1,7 @@ #!/usr/bin/env bats -cd "${BATS_TEST_DIRNAME}" -export CLOE_ROOT="${BATS_TEST_DIRNAME}/../../.." -load "${CLOE_ROOT}/tests/setup_bats.bash" -load "${CLOE_ROOT}/tests/setup_testname.bash" +load setup_bats +load setup_testname @test "$(testname 'Expect check success' 'test_esmini_open_loop.json' '05be11dc-1904-4f5e-bed7-531adf51a55c')" { cloe-engine check test_esmini_open_loop.json