Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Sony.onmicrosoft.com; s=selector1-Sony-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=3BSgfwPIGvDBlMCqH+IvYRYrRJbWhJk4dn40Vvw92Fk=; b=SUI7/7mFfN6H4lO/U64pSoQh2V91Y6qA5PKDa6XF1T4M6tu7v+/D7q8ORlLfFvRtzlUTUijJERujfJcT/qaglHuND5n8VLBZVB+qncqLRYi8R4Kyn373lciJG51pjXhmU4WAYLhPlG5xxlhyiasL3fa6YlPN/Vd6qmGS6qamyyk= From: Date: Tue, 3 Apr 2018 20:03:04 +0000 Message-ID: References: <20180329000832.12268-1-guicc@profusion.mobi> <20180329000832.12268-2-guicc@profusion.mobi> <20180403031817.4ixl6x2qk3x4yyr5@guicc-arch-three> In-Reply-To: <20180403031817.4ixl6x2qk3x4yyr5@guicc-arch-three> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Fuego] [PATCH 01/16] Add fuego-release Functional test List-Id: Mailing list for the Fuego test framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: guicc@profusion.mobi Cc: fuego@lists.linuxfoundation.org > -----Original Message----- > From: Guilherme Camargo on Monday, April 02, 2018 8:18 PM > On Fri, Mar 30, 2018 at 10:37:21PM +0000, Tim.Bird@sony.com wrote: > > > > > > > -----Original Message----- > > > From: Tim Bird > > > My strategy is to apply all your patches, but ask for modifications, > > > that you can provide as patches on top of this set. > > > > > > If I make these changes, they will break other patches in the > > > series, which will be obnoxious and time-consuming to fix. > > > > > > See below inline for comments. > > > -- Tim > > > > > > > -----Original Message----- > > > > From: Guilherme Campos Camargo > > > > Allows Fuego to test new Fuego releases. > > > > > > > > The fuego and fuego-core repositores and branches to be tested may > be > > > > configured on the specs.json file. Their defaults are: > > > > > > > > "FUEGOREPO":"https://bitbucket.org/tbird20d/fuego", > > > > "FUEGOBRANCH":"master", > > > > "FUEGOCOREREPO":"https://bitbucket.org/tbird20d/fuego-core", > > > > "FUEGOCOREBRANCH":"master" > > > > > > > Can you please add underscores to these names: > > > FUEGO_REPO, FUEGO_CORE_BRANCH, etc. > > > ? > > > > > > It's very nice to be able to customize these in the spec file. > > > > > > > Signed-off-by: Guilherme Campos Camargo > > > > --- > > > > engine/tests/Functional.fuegotest/fuego_test.sh | 29 ++ > > > > engine/tests/Functional.fuegotest/spec.json | 11 + > > > > engine/tests/Functional.fuegotest/test_run.py | 427 > > > > ++++++++++++++++++++++++ > > > > 3 files changed, 467 insertions(+) > > > > create mode 100755 engine/tests/Functional.fuegotest/fuego_test.sh > > > > create mode 100644 engine/tests/Functional.fuegotest/spec.json > > > > create mode 100755 engine/tests/Functional.fuegotest/test_run.py > > > > > > > > diff --git a/engine/tests/Functional.fuegotest/fuego_test.sh > > > > b/engine/tests/Functional.fuegotest/fuego_test.sh > > > > new file mode 100755 > > > > index 0000000..192c15b > > > > --- /dev/null > > > > +++ b/engine/tests/Functional.fuegotest/fuego_test.sh > > > > @@ -0,0 +1,29 @@ > > > > +#!/bin/bash > > > > + > > > > +set -e > > > > + > > > > +readonly fuego_release_dir=3Dfuego-release > > > > + > > > > +function test_build { > > > > + if [ -d ${fuego_release_dir} ]; then > > > > + rm -r ${fuego_release_dir} > > > > + fi > > > > + git clone --quiet --depth 1 --single-branch \ > > > > + --branch "${FUNCTIONAL_FUEGOTEST_FUEGOBRANCH}" \ > > > > + "${FUNCTIONAL_FUEGOTEST_FUEGOREPO}" \ > > > > I realize now that my suggestion to change the test name and > > add underscores is going to make some really long variable names. > > > > e.g. FUNCTIONAL_FUEGO_RELEASE_TEST_FUEGO_CORE_REPO. > > > > Yikes. Oh well, let me know what you think. I still think the > > name has more clarity, but maybe it could be shortened inside > > the test? > > >=20 > I agree that the names will become more readable specially on the specs > json by using the underlines and I like the change on the test name. I > don't think that having these huge variables is a big problem, because, > as you said, we can just create an alias for them in the fuego_test.sh >=20 > That's what I will do, then. >=20 > Also, do we really need the to have the test name as a prefix for specs > variables? If not, we might consider changing that in the future, by > exporting the variables with the same names that they have on the > spec.json. In a shell environment, where these end up being global in scope, it's useful to prefix the variable with something to avoid name collisions. I'd be happy to get rid of the "FUNCTIONAL_" part though, and possibly we could use the same prefix, instead of a test-specific prefix: something like: SPEC_ARGS, instead of FUNCTIONAL_HELLO_WORLD_ARGS. I can't think of any cases where we use variables from multiple tests in the same run. (BTW - don't go do any of that - I've been meaning to rename 'spec' to something else... it's on my to-do list.) -- Tim