CyberShadow / Digger

A tool to build D and bisect old D versions
Other
57 stars 9 forks source link

Digger as test runner #30

Closed PetarKirov closed 8 years ago

PetarKirov commented 8 years ago

I would like use Digger for dmd/druntime/phobos hacking. What I currently find missing is a test action, which would, for example, run the all the tests for DMD and then report only the ones that fail. If possible without rebuilding DMD, if there are no source or makefile changes (this is a low priority request, as I can imagine that this can be hard to implement).

Also, AFAIU, currently Digger may overwrite my changes with the files from the current commit, because it tries to ensure a clean build environment, which would be bad for my use case.

Some examples:

cd ~/dlang

ls
# the directory is empty

# Running Digger for the first time will fetch DMD and the other repos
digger build

# Edit some of the DMD test files
cd repo/dmd/test/runnable
vim test42.d

# Go back to the repo dir in the root of the digger tree:
cd ~/dlang/repo

# Only runs the DMD tests, regardless if a rebuild may be needed
digger test dmd

# Rebuilds DMD and then runs the tests:
digger test dmd --rebuild --build-mode=debug

# Build DMD in release mode for 64-bit and run the tests:
digger test dmd --rebuild --build-mode=release --model=64

# Builds phobos in release mode with debug information
# (something like `dmd -inline -release -O -g`)
# and runs the unittests.
# The `--rebuild` option is not needed in this case because
# the unittests are part of the phobos source.
digger test phobos --rebuild --build-mode=release-dinfo

Exposing this functionality through the web interface would be nice, but it's even lower priority on my list than test-only builds.

CyberShadow commented 8 years ago

What I currently find missing is a test action, which would, for example, run the all the tests for DMD and then report only the ones that fail.

Agreed, would be nice to have.

Also, AFAIU, currently Digger may overwrite my changes with the files from the current commit, because it tries to ensure a clean build environment, which would be bad for my use case.

Agreed, Digger could save the state of the files upon finishing a build, and warn if they had been modified before overwriting them.

CyberShadow commented 8 years ago

What I currently find missing is a test action, which would, for example, run the all the tests for DMD and then report only the ones that fail.

https://github.com/CyberShadow/Digger/commit/8223097ad9f6da9119c992ea3b1fddc9400183b9

Also, AFAIU, currently Digger may overwrite my changes with the files from the current commit, because it tries to ensure a clean build environment, which would be bad for my use case.

https://github.com/CyberShadow/ae/commit/a57972cb66b1bbfbfa7e1483de0e5e2d38d66569