diff options
author | Robert Managan <managan1@llnl.gov> | 2008-10-08 16:30:07 (GMT) |
---|---|---|
committer | Robert Managan <managan1@llnl.gov> | 2008-10-08 16:30:07 (GMT) |
commit | 08bf8fbd0b18f1737ac101f3eba31d41b8c9fb5c (patch) | |
tree | f2db9aab60c73c1c5476854985f7ef49cbe2394f /test | |
parent | f50c85585ecd15a547257d311ff953d59fd94d09 (diff) | |
download | SCons-08bf8fbd0b18f1737ac101f3eba31d41b8c9fb5c.zip SCons-08bf8fbd0b18f1737ac101f3eba31d41b8c9fb5c.tar.gz SCons-08bf8fbd0b18f1737ac101f3eba31d41b8c9fb5c.tar.bz2 |
Testing on a Mac turned up a problem that did not show up on linux.
SK and I agree that we are surprised by that.
Both bld = env['BUILDERS']['PDF'] and bld = env['BUILDERS']['DVI'] had
lines like
bld.add_action('.tex', LaTeXAuxAction) # for DVI
bld.add_action('.tex', PDFLaTeXAuxAction) # for PDF
run from the initialization of two tools. This was a BAD thing.
That cured some test failures. For the rest I made all the TEX tests
initialize the environment with the os.environ PATH since the check
for the existence of the tools with where_is that looks on the system path.
So the tests still quietly exit if the tool is not on the system path
and now find if it is in a non-standard location like I have.
Diffstat (limited to 'test')
-rw-r--r-- | test/TEX/auxiliaries.py | 3 | ||||
-rw-r--r-- | test/TEX/bibliography.py | 3 | ||||
-rw-r--r-- | test/TEX/bibtex-latex-rerun.py | 3 | ||||
-rw-r--r-- | test/TEX/clean.py | 5 | ||||
-rw-r--r-- | test/TEX/makeindex.py | 7 | ||||
-rw-r--r-- | test/TEX/multi-run.py | 31 | ||||
-rw-r--r-- | test/TEX/subdir-input.py | 3 | ||||
-rw-r--r-- | test/TEX/subdir_variantdir_input.py | 3 |
8 files changed, 42 insertions, 16 deletions
diff --git a/test/TEX/auxiliaries.py b/test/TEX/auxiliaries.py index 01d1465..aa41663 100644 --- a/test/TEX/auxiliaries.py +++ b/test/TEX/auxiliaries.py @@ -52,8 +52,9 @@ if not dvips or not latex: test.subdir(['docs']) test.write(['SConstruct'], """\ +import os env = Environment(tools = ['pdftex', 'dvipdf', 'dvips', 'tex', 'latex'], - ENV = {}, + ENV = {'PATH' : os.environ['PATH']}, BUILD_DIR = '#build/docs') # Use 'duplicate=1' because LaTeX toolchain does not work properly for diff --git a/test/TEX/bibliography.py b/test/TEX/bibliography.py index 6949a31..a1943c0 100644 --- a/test/TEX/bibliography.py +++ b/test/TEX/bibliography.py @@ -44,7 +44,8 @@ if not dvips or not bibtex: test.skip_test("Could not find dvips or bibtex; skipping test(s).\n") test.write('SConstruct', """\ -env = Environment(tools = ['tex', 'latex', 'dvips']) +import os +env = Environment(tools = ['tex', 'latex', 'dvips'],ENV = {'PATH' : os.environ['PATH']}) env.PostScript('simple', 'simple.tex') """) diff --git a/test/TEX/bibtex-latex-rerun.py b/test/TEX/bibtex-latex-rerun.py index bd1fd3b..c82e4ea 100644 --- a/test/TEX/bibtex-latex-rerun.py +++ b/test/TEX/bibtex-latex-rerun.py @@ -42,7 +42,8 @@ if not pdflatex: test.skip_test("Could not find pdflatex; skipping test(s).\n") test.write(['SConstruct'], """\ -env = Environment(tools=['pdftex', 'tex']) +import os +env = Environment(tools=['pdftex', 'tex'],ENV = {'PATH' : os.environ['PATH']}) env.PDF( 'bibtest.tex' ) """) diff --git a/test/TEX/clean.py b/test/TEX/clean.py index 6615fc9..499cf5b 100644 --- a/test/TEX/clean.py +++ b/test/TEX/clean.py @@ -67,7 +67,10 @@ bibfile = r""" """ test.write('SConstruct', """\ -DVI( "foo.ltx" ) +import os +env = Environment(tools = ['tex', 'latex'], + ENV = {'PATH' : os.environ['PATH']}) +env.DVI( "foo.ltx" ) """) test.write('foo.ltx', input_file) diff --git a/test/TEX/makeindex.py b/test/TEX/makeindex.py index 8f99284..765ef4d 100644 --- a/test/TEX/makeindex.py +++ b/test/TEX/makeindex.py @@ -44,8 +44,11 @@ if not pdflatex or not makeindex: test.skip_test("Could not find pdflatex or makeindex; skipping test(s).\n") test.write('SConstruct', """\ -PDF( "no_index.tex" ) -PDF( "simple.tex" ) +import os +env = Environment(tools = ['pdftex', 'dvipdf', 'tex', 'latex'], + ENV = {'PATH' : os.environ['PATH']}) +env.PDF( "no_index.tex" ) +env.PDF( "simple.tex" ) """) test.write('no_index.tex', r""" diff --git a/test/TEX/multi-run.py b/test/TEX/multi-run.py index 686263d..2659e16 100644 --- a/test/TEX/multi-run.py +++ b/test/TEX/multi-run.py @@ -136,8 +136,11 @@ bibfile = r""" if tex: test.write(['work1', 'SConstruct'], """\ -DVI( "foo.tex" ) -PDF( "foo.tex" ) +import os +env = Environment(tools = ['pdftex', 'dvipdf', 'tex', 'latex'], + ENV = {'PATH' : os.environ['PATH']}) +env.DVI( "foo.tex" ) +env.PDF( "foo.tex" ) """) test.write(['work1', 'foo.tex'], input_file) @@ -154,7 +157,10 @@ PDF( "foo.tex" ) test.fail_test(1) test.write(['work3', 'SConstruct'], """\ -DVI( "foo3.tex" ) +import os +env = Environment(tools = ['tex', 'latex'], + ENV = {'PATH' : os.environ['PATH']}) +env.DVI( "foo3.tex" ) """) test.write(['work3', 'foo3.tex'], input_file3) @@ -172,8 +178,11 @@ DVI( "foo3.tex" ) if latex: test.write(['work2', 'SConstruct'], """\ -DVI( "foo.ltx" ) -PDF( "foo.ltx" ) +import os +env = Environment(tools = ['dvi', 'pdf', 'pdftex', 'dvipdf', 'pdflatex', 'tex', 'latex'], + ENV = {'PATH' : os.environ['PATH']}) +env.DVI( "foo.ltx" ) +env.PDF( "foo.ltx" ) """) test.write(['work2', 'foo.ltx'], input_file) @@ -190,8 +199,11 @@ PDF( "foo.ltx" ) test.fail_test(1) test.write(['work3', 'SConstruct'], """\ -DVI( "foo3.tex" ) -PDF( "foo3.tex" ) +import os +env = Environment(tools = ['pdftex', 'dvipdf', 'tex', 'latex'], + ENV = {'PATH' : os.environ['PATH']}) +env.DVI( "foo3.tex" ) +env.PDF( "foo3.tex" ) """) test.write(['work3', 'foo3.tex'], input_file3) @@ -206,7 +218,10 @@ PDF( "foo3.tex" ) test.write(['work4', 'SConstruct'], """\ -DVI( "foo.ltx" ) +import os +env = Environment(tools = ['tex', 'latex'], + ENV = {'PATH' : os.environ['PATH']}) +env.DVI( "foo.ltx" ) """) test.write(['work4', 'foo.ltx'], input_file2) diff --git a/test/TEX/subdir-input.py b/test/TEX/subdir-input.py index d16ba5f..a0bb7ee 100644 --- a/test/TEX/subdir-input.py +++ b/test/TEX/subdir-input.py @@ -49,7 +49,8 @@ if not pdflatex: test.subdir('sub') test.write('SConstruct', """\ -env = Environment(TOOLS = ['tex', 'pdftex']) +import os +env = Environment(TOOLS = ['tex', 'pdftex'], ENV = {'PATH' : os.environ['PATH']}) env.PDF( 'sub/x.tex' ) env.DVI( 'sub/x.tex' ) """) diff --git a/test/TEX/subdir_variantdir_input.py b/test/TEX/subdir_variantdir_input.py index 1229032..b663359 100644 --- a/test/TEX/subdir_variantdir_input.py +++ b/test/TEX/subdir_variantdir_input.py @@ -52,7 +52,8 @@ test.subdir('docs') test.subdir(['docs','sub']) test.write('SConstruct', """\ -env = Environment(TOOLS = ['tex', 'pdftex']) +import os +env = Environment(TOOLS = ['tex', 'pdftex'],ENV = {'PATH' : os.environ['PATH']}) env.VariantDir('build', 'docs',duplicate=0) env.SConscript('build/SConscript', exports = ['env']) |