Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
asorbini committed Apr 16, 2024
1 parent 4dfc8e5 commit e130222
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/_deb_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ jobs:
image_version="$(echo ${image_version} | tr / -)"
deb_builder_tag=$(echo ${{inputs.base-tag}} | tr : - | tr / -)
test_date=$(date +%Y%m%d-%H%M%S)
test_id=deb-${builder_tag}-${{ inputs.platform }}__${image_version}
test_id=deb-${deb_builder_tag}-${{ inputs.platform }}__${image_version}
test_artifact=uno-test-${test_id}__${test_date}
test_runner_artifact=uno-runner-${builder_tag}-${{ inputs.platform }}__${image_version}__${test_date}
test_runner_artifact=uno-runner-${deb_builder_tag}-${{ inputs.platform }}__${image_version}__${test_date}
deb_artifact=uno-deb-${builder_tag}-${{ inputs.platform }}__${image_version}__${test_date}
(
echo RUNNER=${runner}
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ needs.config.outputs.TEST_RUNNER_ARTIFACT }}
path: src/uno/dist/bundle/runner
path: src/uno/dist/bundle/default/runner

- name: Fix permissions
run: |
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,6 @@ jobs:
if: ${{ inputs.run-integration }}
run: |
make -C src/uno extract-license
docker run --rm \
-v $(pwd):/workspace \
${{ needs.config.outputs.TEST_IMAGE }} \
cp /rti_license.dat /workspace/rti_license.dat
- name: Run unit tests
if: inputs.run-unit
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,16 @@ deb:
test: test-unit test-integration ;


# Call pytest directly from venv, since it's mounted on containers too
PYTEST ?= .venv/bin/pytest
# Call pytest directly from venv on host, but unqualified in container
ifneq ($(IN_DOCKER),)
PYTEST_UNIT ?= .venv/bin/pytest
else # ifneq ($(IN_DOCKER),)
PYTEST_UNIT ?= pytest
endif # ifneq ($(IN_DOCKER),)

# Run unit tests
BASE_UNIT_TEST_COMMAND := \
$(PYTEST) -s -v \
$(PYTEST_UNIT) -s -v \
--junit-xml=$(TEST_RESULTS_DIR)/$(TEST_JUNIT_REPORT)__unit.xml \
test/unit
# When run by a CI test, the test image is expected to contain an
Expand Down Expand Up @@ -217,11 +221,7 @@ test-unit: .venv
test-integration: .venv
@$(CHECK_RTI_LICENSE_FILE)
mkdir -p $(TEST_RESULTS_DIR)
set -ex; \
# For releases, we shouldn't mount the local module, but rather
# test the one included in the docker image
[ -z "${TEST_RELEASE}" ] || export DEV=y; \
$(PYTEST) -s -v \
$</bin/pytest -s -v \
--junit-xml=$(TEST_RESULTS_DIR)/$(TEST_JUNIT_REPORT)__integration.xml \
test/integration \
$(INTEGRATION_TEST_ARGS)
Expand Down Expand Up @@ -285,7 +285,7 @@ else # ifneq ($(USE_POETRY),)
$(wildcard plugins/*/pyproject.toml)
rm -rf $@
python3 -m venv $@
$@/bin/pip install -U pip setuptools ruff pre-commit pytest
$@/bin/pip install -U pip setuptools ruff pre-commit
$@/bin/pip install -e .
[ -z "$(UNO_MIDDLEWARE)" ] || $@/bin/pip install -e plugins/$(UNO_MIDDLEWARE)
[ -n "$(UNO_MIDDLEWARE)" ] || $@/bin/pip install rti.connext
Expand Down
2 changes: 1 addition & 1 deletion scripts/cleanup_workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ deleterun() {
run="${1}"
id="$(cut -f 3 <<< "$run")"
if [ -z "${NOOP}" ]; then
gh api -X DELETE "/repos/$repo/actions/runs/$id"
gh api -X DELETE "/repos/${REPO}/actions/runs/$id"
[[ $? = 0 ]] && result="OK!" || result="BAD"
printf "%s\t%s\n" "$result" "$run"
else
Expand Down

0 comments on commit e130222

Please sign in to comment.