You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering how to set up an arb development environment, especially with respect to building and testing? I've made a couple of PRs already but with a pretty inefficient workflow that involves rebuilding and retesting everything all the time.
Below I'm pasting the kind of script I'm starting to write to work around this. Is there a better way? If not, that is OK.
from __future__ importprint_function, divisionimportsubprocessimportargparseimportosdefmain(subdirectory):
# Find the full path to the subdirectory.cwd=os.getcwd()
p=os.path.join(cwd, 'build', subdirectory, 'test')
# Identify files in the test directory ending with ".d".# These are dependency files which correspond to the executable tests.testfiles= []
forfilenameinos.listdir(p):
base, extension=os.path.splitext(filename)
ifextension=='.d':
testfiles.append(base)
iftestfiles:
print('found', len(testfiles), 'test scripts')
# Define the environment variables for the test scripts.scriptenv=os.environ.copy()
scriptenv['LD_LIBRARY_PATH'] =cwdfortestfileintestfiles:
name=os.path.join(p, testfile)
proc=subprocess.Popen([name], env=scriptenv)
proc.wait()
else:
print('did not find any test scripts')
if__name__=='__main__':
parser=argparse.ArgumentParser()
parser.add_argument('--subdirectory', '-s', required=True,
help='a subdirectory to test (e.g. acb_mat)')
args=parser.parse_args()
main(args.subdirectory)
The text was updated successfully, but these errors were encountered:
make check runs all tests, and make check MOD=acb_mat runs tests for the acb_mat module.
Normally, if you make changes to one module, there's no need to test the whole library (unless you changed a function that is used elsewhere).
Personally, I've simply placed the Arb source directory in LD_LIBRARY_PATH in my .bashrc. After make and make check (or make check MOD=acb_mat) to build the test programs, I can execute single tests like build/acb_mat/test/t-mul directly.
I'm wondering how to set up an arb development environment, especially with respect to building and testing? I've made a couple of PRs already but with a pretty inefficient workflow that involves rebuilding and retesting everything all the time.
Below I'm pasting the kind of script I'm starting to write to work around this. Is there a better way? If not, that is OK.
The text was updated successfully, but these errors were encountered: