Skip to content

Commit

Permalink
added workaround for fatal: detected dubious ownership in repository
Browse files Browse the repository at this point in the history
  • Loading branch information
keithm-xmos committed Apr 13, 2023
1 parent 996dc1d commit e784fc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Run tests
run: |
docker run --rm -u $(id -u):$(id -g) -w /fwk_io/test -v ${{github.workspace}}:/fwk_io ${FWK_IO_TESTER_IMAGE} bash -l run_tests.sh lib_i2c
docker run --rm -w /fwk_io/test -v ${{github.workspace}}:/fwk_io ${FWK_IO_TESTER_IMAGE} bash -l run_tests.sh lib_i2c
i2stests:
name: I2S tests
Expand All @@ -102,7 +102,7 @@ jobs:
- name: Run tests
run: |
docker run --rm -u $(id -u):$(id -g) -w /fwk_io/test -v ${{github.workspace}}:/fwk_io ${FWK_IO_TESTER_IMAGE} bash -l run_tests.sh lib_i2s
docker run --rm -w /fwk_io/test -v ${{github.workspace}}:/fwk_io ${FWK_IO_TESTER_IMAGE} bash -l run_tests.sh lib_i2s
spitests:
name: SPI tests
Expand All @@ -121,7 +121,7 @@ jobs:
- name: Run tests
run: |
docker run --rm -u $(id -u):$(id -g) -w /fwk_io/test -v ${{github.workspace}}:/fwk_io ${FWK_IO_TESTER_IMAGE} bash -l run_tests.sh lib_spi
docker run --rm -w /fwk_io/test -v ${{github.workspace}}:/fwk_io ${FWK_IO_TESTER_IMAGE} bash -l run_tests.sh lib_spi
uarttests:
Expand All @@ -141,4 +141,4 @@ jobs:
- name: Run tests
run: |
docker run --rm -u $(id -u):$(id -g) -w /fwk_io/test -v ${{github.workspace}}:/fwk_io ${FWK_IO_TESTER_IMAGE} bash -l run_tests.sh lib_uart
docker run --rm -w /fwk_io/test -v ${{github.workspace}}:/fwk_io ${FWK_IO_TESTER_IMAGE} bash -l run_tests.sh lib_uart
5 changes: 5 additions & 0 deletions test/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/bash
set -e

if [ -f /.dockerenv ]; then
# Docker workaround for: "fatal: detected dubious ownership in repository"
git config --global --add safe.directory /fwk_io
fi

if [ -z "$1" ] || [ "$1" == "all" ]
then
declare -a hil_test_libs=(
Expand Down

0 comments on commit e784fc7

Please sign in to comment.