#9967: Allow concurrent running/testing of multiple sage branches
---------------------------------------+------------------------------------
   Reporter:  robertwb                 |       Owner:  ddrake      
       Type:  defect                   |      Status:  needs_review
   Priority:  major                    |   Milestone:  sage-4.6    
  Component:  doctest                  |    Keywords:              
     Author:  Robert Bradshaw          |    Upstream:  N/A         
   Reviewer:  Dan Drake, John Cremona  |      Merged:              
Work_issues:                           |  
---------------------------------------+------------------------------------

Comment(by ddrake):

 I ran into a bit of a problem applying the doctests patch. The branch
 symlinks are set up just like my comment above. I decided to apply the
 doctest patch in the main branch, so I qimport'ed the patch there, pushed
 it, and back in SAGE_ROOT, did
 {{{
 env SAGE_BRANCH=main ./sage -b
 }}}
 Nothing related to doc/common/builder.py showed up, but I decided to try a
 test anyway:
 {{{
 dr...@sagenb:~/s/sage-4.6.alpha3$ env SAGE_BRANCH=main ./sage -testall
 Testing of examples currently not implemented.
 sage -t  -force_lib "devel/sage/doc/common/builder.py"
 **********************************************************************
 File "/home/drake/s/sage-4.6.alpha3/devel/sage/doc/common/builder.py",
 line 158:
     sage: b._output_dir('html')
 Expected:
     '.../devel/sage/doc/output/html/en/tutorial'
 Got:
     '/home/drake/s/sage-4.6.alpha3/devel/sage-
 main/doc/output/html/en/tutorial'
 **********************************************************************
 }}}

 The patch has been applied, but the test still failed. So I tried changing
 the symlink:
 {{{
 dr...@sagenb:~/s/sage-4.6.alpha3$ ./sage -b main
   (usual output, no mention of builder.py)
 dr...@sagenb:~/s/sage-4.6.alpha3$ ./sage -testall
 Testing of examples currently not implemented.
 sage -t  -force_lib "devel/sage/doc/common/builder.py"
          [5.9 s]
 }}}

 Okay, so things worked when the symlink is set as usual. I tried testing
 another branch, which should fail, since the patch hasn't been applied
 there:
 {{{
 dr...@sagenb:~/s/sage-4.6.alpha3$ env SAGE_BRANCH=foo ./sage -testall
 Testing of examples currently not implemented.
 sage -t  -force_lib "devel/sage/doc/common/builder.py"
          [2.4 s]
 }}}

 The sage-foo branch definitely doesn't have the doctest patch applied, so
 something for the doctest here is ignoring the env variable and using the
 symlink.

 I think the culprit is sage-maketest, which features:
 {{{
 "$SAGE_ROOT"/sage -t -sagenb "$@" "$SAGE_ROOT"/devel/sage/doc/common
 "$SAGE_ROOT"/devel/sage/doc/en "$SAGE_ROOT"/devel/sage/doc/fr
 "$SAGE_ROOT"/devel/sage/sage 2>&1 | tee -a "$SAGE_TEST_LOG"
 }}}
 so that's ignoring the branch.

 I added this to sage-maketest:
 {{{
 # if SAGE_BRANCH is provided, prepend a dash; we'll use
 #   /sage"$BRANCH"/
 # below, which will automatically use the symlink if SAGE_BRANCH is
 # unset
 if [ -n "$SAGE_BRANCH" ]; then
   BRANCH=-$SAGE_BRANCH
 fi
 }}}

 and changed the main testing line below that appropriately. It seems to
 work. Does that seem like the right thing to do?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9967#comment:17>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to