Address all coments in @trws's latest comment in PR #869.

I addressed them by factoring the code better to follow the visitor
pattern.  This will allow actions to be easily added in the future.
These may not even be file sytsem views.  One could add actions to
generate shell init scripts, JSON DAG-dumpers, GraphViz DOT file
generators, etc (yes, some of these are alread in there - just to give
the idea).

Also added is a top-level test

 $ source share/spack/setup-env.sh
 $ ./share/spack/examples/test_view.sh

Read the top of that script first.
This commit is contained in:
Brett Viren
2016-05-07 18:24:24 -04:00
parent 26c5bc9d97
commit 2d1430da13
6 changed files with 231 additions and 122 deletions

View File

@@ -9,6 +9,7 @@ class TestA(Package):
"""The test-a package"""
url = 'file://'+source
homepage = "http://www.example.com/"
version('0.0', '4e823d0af4154fcf52b75dad41b7fd63')

View File

@@ -9,6 +9,7 @@ class TestB(Package):
"""The test-b package"""
url = 'file://'+source
homepage = "http://www.example.com/"
version('0.0', '4e823d0af4154fcf52b75dad41b7fd63')

View File

@@ -9,6 +9,7 @@ class TestC(Package):
"""The test-c package"""
url = 'file://'+source
homepage = "http://www.example.com/"
version('0.0', '4e823d0af4154fcf52b75dad41b7fd63')

View File

@@ -9,6 +9,7 @@ class TestD(Package):
"""The test-d package"""
url = 'file://'+source
homepage = "http://www.example.com/"
version('0.0', '4e823d0af4154fcf52b75dad41b7fd63')