apjanke / octave-testify

New BIST (Built-In Self Test) functions for GNU Octave
GNU General Public License v3.0
4 stars 2 forks source link

forgepkgtester: handle deps by ordering packages instead of re-installing each time #17

Closed apjanke closed 5 years ago

apjanke commented 5 years ago

Right now, I'm handling dependencies by individually reinstalling the dependencies for each package when I install and test it. This is inefficient. It would be better to handle dependencies by collecting the entire dependency graph for all tested packages at the beginning, installing the non-tested dependencies up front, and then reordering the tested packages so that they were installed in dependency order, and then not uninstall any package until the end of all testing. That would eliminate redundant dependency installations and save time in the testing.

apjanke commented 5 years ago

Note: To do this, we need an order_deps (pkgs) function that calculates a package install order for both the listed packages and other dependency packages. Both the packages and the dependency packages must be sorted in dependency order. When doing the prereq/dependency installation, we'll need to install these packages individually and track which ones failed, so we can individually fail per-package tests for those packages whose dependency installations failed.

apjanke commented 5 years ago

Done in https://github.com/apjanke/octave-testify/commit/56eb13ab4b67ae19f7928fc1e70d4ebaca7bda73.