ecmwf / ecbuild

A CMake-based build system, consisting of a collection of CMake macros and functions that ease the managing of software build systems
https://ecbuild.readthedocs.io
Apache License 2.0
26 stars 25 forks source link

Allow ecbuild_get_test_data to get data from non http: locations #20

Open DJDavies2 opened 4 years ago

DJDavies2 commented 4 years ago

Apologies if this is the wrong repository; I am building and ctesting eckit and suffering a ctest failure in the get_eckit_test_data task:

(curl) downloading http://download.ecmwf.org/test-data/eckit/tests/utils/2t_sfc.grib curl: (28) Connection timed out after 30000 milliseconds gmake[1]: *** [eckit/tests/utils/2t_sfc.grib] Error 28 gmake: *** [__get_data_get_eckit_test_data_2t_sfc_grib/fast] Error 2 Basically neither curl nor wget will work on this platform due to lack of network connection. I could download the file separately and make it available either via cp or scp but there doesn't appear to be a way for ecbuild_get_test_data to retrieve the file that way. Is this functionality that could be added? Or have a missed something?

Vaguely related to https://github.com/ecmwf/ecbuild/issues/12.

wdeconinck commented 4 years ago

Is it possible to run in your build-dir

ctest -R get_eckit_test_data

or do you also compile on a system without network connection?

It gets quite tricky to know otherwise what you would need exactly beforehand, as that would be specified during CMake configuration time (without internet connection). If you can figure out which files need copying, I guess you can also download them prior, in a directory <path-to-offline-test-data>/eckit and then configure with

-DECBUILD_DOWNLOAD_BASE_URL=file://<path-to-offline-test-data>

What do you think @tlmquintino ?

DJDavies2 commented 4 years ago

There is no network connection where I am running (or compiling) so the get_eckit_test_data task doesn't work. Is that ECBUILD_DOWNLOAD_BASE_URL option available now? If so I could try it.