Skip to contentSkip to conversation

support/run-tests: export download dir

PATCH New Yann E. MORIN 2 participants 2 messages Sep 17, 2017 – Oct 10, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support/run-tests: export download dir

Currently, the download directory, when specified with the -d option, is only used to store the files downloaded by the testing infra, not those downloaded by Buildroot.

So, we end up with this situation:

    BR2_DL_DIR  | -d DIR   | test downloads   | BR downloads
    ------------+----------+------------------+--------------
    unset       | unset    | [error]          | [error]
    unset       | set      | in $(DIR)        | in $(TOP_DIR)/dl
    set         | unset    | in $(BR2_DL_DIR) | in $(BR2_DL_DIR)
    set         | set      | in $(DIR)        | in $(BR2_DL_DIR)

This is not very consistent.

We change the behaviour so that the value of -d always takes precedence, and is used by Buildroot as well, giving this new behaviour:

    BR2_DL_DIR  | -d DIR   | test downloads   | BR downloads
    ------------+----------+------------------+--------------
    unset       | unset    | [error]          | [error]
    unset       | set      | in $(DIR)        | in $(DIR)
    set         | unset    | in $(BR2_DL_DIR) | in $(BR2_DL_DIR)
    set         | set      | in $(DIR)        | in $(DIR)
Cc Ricardo Martincoski <[email protected]>
Cc Thomas Petazzoni <[email protected]>
---
 support/testing/run-tests | 1 +
 1 file changed, 1 insertion(+)
support/testing/run-tests +1 -0
index ae0bd336b5..5c9897e0f5 100755
@@ -57,6 +57,7 @@ def main():
             return 1
 
     BRTest.downloaddir = os.path.abspath(args.download)
+    os.putenv("BR2_DL_DIR", BRTest.downloaddir)
 
     if args.output is None:
         print "Missing output directory, please use -o/--output"
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 support/run-tests: export download dir

Hello,

Quoted 25 lines · Yann E. MORIN

Currently, the download directory, when specified with the -d option, is only used to store the files downloaded by the testing infra, not those downloaded by Buildroot.

So, we end up with this situation:

    BR2_DL_DIR  | -d DIR   | test downloads   | BR downloads
    ------------+----------+------------------+--------------
    unset       | unset    | [error]          | [error]
    unset       | set      | in $(DIR)        | in $(TOP_DIR)/dl
    set         | unset    | in $(BR2_DL_DIR) | in $(BR2_DL_DIR)
    set         | set      | in $(DIR)        | in $(BR2_DL_DIR)

This is not very consistent.

We change the behaviour so that the value of -d always takes precedence, and is used by Buildroot as well, giving this new behaviour:

    BR2_DL_DIR  | -d DIR   | test downloads   | BR downloads
    ------------+----------+------------------+--------------
    unset       | unset    | [error]          | [error]
    unset       | set      | in $(DIR)        | in $(DIR)
    set         | unset    | in $(BR2_DL_DIR) | in $(BR2_DL_DIR)
    set         | set      | in $(DIR)        | in $(DIR)
Quoted 6 lines
Cc Ricardo Martincoski <[email protected]>
Cc Thomas Petazzoni <[email protected]>
---
 support/testing/run-tests | 1 +
 1 file changed, 1 insertion(+)

Indeed, makes sense. Applied, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com