From 60050af186f994e65c8f6ba23184e2ee056a5eee Mon Sep 17 00:00:00 2001 From: Ben10do Date: Sun, 3 Jun 2018 18:23:19 +0100 Subject: [PATCH 1/2] Allow test repos to be kept locally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We no longer assume that the test repos don’t exist when we run run-tests.sh. This allows developers to choose to keep them, to allow them to run the tests more quickly. - Add the test repos to the .gitignore. - Check if the directory for each repo already exists, before trying to clone it. - Do a `git pull` for each repo, to ensure that existing copies of repos are up-to-date. Signed-off-by: Ben10do --- .gitignore | 4 ++++ test/run-tests.sh | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e8ae0a23..32e6b473 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ rgbgfx *.o *.exe .checkpatch-camelcase.* + +test/pokecrystal/* +test/pokered/* +test/ucity/* diff --git a/test/run-tests.sh b/test/run-tests.sh index e4b9b6a6..b93e0893 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -15,20 +15,30 @@ pushd link popd # Test some significant external projects that use RGBDS +# When adding new ones, don't forget to add them to the .gitignore! -git clone https://github.com/pret/pokecrystal.git --depth=1 +if [ ! -d pokecrystal ]; then + git clone https://github.com/pret/pokecrystal.git --depth=1 +fi pushd pokecrystal +git pull make -j make compare popd -git clone --recursive https://github.com/pret/pokered.git --depth=1 +if [ ! -d pokered ]; then + git clone --recursive https://github.com/pret/pokered.git --depth=1 +fi pushd pokered +git pull make -j make compare popd -git clone https://github.com/AntonioND/ucity.git --depth=1 +if [ ! -d ucity ]; then + git clone https://github.com/AntonioND/ucity.git --depth=1 +fi pushd ucity +git pull make -j popd From 1af5343e297105f3b033eb1eb5d45e421a765581 Mon Sep 17 00:00:00 2001 From: Ben10do Date: Wed, 6 Jun 2018 21:09:31 +0100 Subject: [PATCH 2/2] Use specific commits when running tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ensures that build breaks to any of the test projects don’t immediately cause rgbds tests to fail. On clone, I’ve set it up to pull the commits since the day before the desired commit. Sadly, this will clone more recent commits that we’re not testing, but at least it ensures that the desired commit can be checked out. This is hopefully a good enough replacement for —depth=1. Signed-off-by: Ben10do --- test/run-tests.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/run-tests.sh b/test/run-tests.sh index b93e0893..243bf4aa 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -18,27 +18,30 @@ popd # When adding new ones, don't forget to add them to the .gitignore! if [ ! -d pokecrystal ]; then - git clone https://github.com/pret/pokecrystal.git --depth=1 + git clone https://github.com/pret/pokecrystal.git --shallow-since=2018-06-04 --single-branch fi pushd pokecrystal -git pull +git fetch +git checkout 06e169d make -j make compare popd if [ ! -d pokered ]; then - git clone --recursive https://github.com/pret/pokered.git --depth=1 + git clone --recursive https://github.com/pret/pokered.git --shallow-since=2018-03-23 --single-branch fi pushd pokered -git pull +git fetch +git checkout 98f09b6 make -j make compare popd if [ ! -d ucity ]; then - git clone https://github.com/AntonioND/ucity.git --depth=1 + git clone https://github.com/AntonioND/ucity.git --shallow-since=2018-06-05 --single-branch fi pushd ucity -git pull +git fetch +git checkout 9fc8f27 make -j popd