Changeset 107657


Ignore:
Timestamp:
Jul 3, 2013, 11:22:37 PM (7 years ago)
Author:
marius@…
Message:

envvariables removed constraints, removed aux file, added description, cleanup.

Location:
branches/gsoc13-tests/tests/test/envvariables
Files:
1 added
2 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gsoc13-tests/tests/test/envvariables/test.tcl

    r107500 r107657  
    44source [file dirname $argv0]/../library.tcl
    55
    6 set file "output"
    7 set dir "work"
     6makeFile "" $output_file
     7makeDirectory $work_dir
    88set path [file dirname [file normalize $argv0]]
     9
    910
    1011# Initial setup
     
    1516
    1617proc envvar_test {} {
    17     global file
     18    global output_file
    1819    global path
    1920    global portsrc
    2021    global bindir
    2122
    22     # Build helping script
    23     set fp [open script.sh w+]
    24     puts -nonewline $fp "export ENVA=A; export ENVB=B; export PORTSRC="
    25     puts -nonewline $fp $portsrc
    26     puts -nonewline $fp "; "
    27     puts -nonewline $fp $bindir
    28     puts -nonewline $fp "port test"
    29     close $fp
     23    # Build helping string
     24    append string "export ENVA=A; export ENVB=B; "
     25    append string "export PORTSRC=" $portsrc "; "
     26    append string $bindir "port test"
    3027
    31     exec sh script.sh > output
    32     set line [get_line $path/$file "a"]
    33     set line2 [get_line $path/$file "b"]
     28    exec sh -c $string > output
     29    set line [get_line $path/$output_file "a"]
     30    set line2 [get_line $path/$output_file "b"]
    3431    return $line$line2
    3532}
     
    3734test envvariables {
    3835    Regression test for Environment Variables.
    39 } -constraints {
    40     root
    4136} -body {
    4237    envvar_test
     
    4439
    4540
    46 # remove output file and print results
    47 removeFile script.sh
    48 removeFile $file
    49 removeDirectory $dir
    50 
    5141cleanup
    5242cleanupTests
Note: See TracChangeset for help on using the changeset viewer.