if (IN_TEST_MODE) { # override the above for testing
# override PATH
# override file paths to our testcase environment
+ {
+ # Again, the test environment is trusted, but we still run in taint mode.
+ $ENV{TEST_BASE_DIR} =~ m/^([[:graph:] ]+$)/ && -d $1
+ or die "ftp-upload: test mode: TEST_BASE_DIR not valid";
+ my $basedir = $1; # untainted
+ $package_config_base = File::Spec->catdir($basedir, 'packages');
+ $incoming_dir = File::Spec->catdir($basedir, 'incoming');
+ $incoming_tmp = File::Spec->catdir($basedir, 'in-stage');
+ $destfinal = File::Spec->catdir($basedir, 'pub');
+ $olddestfinal = File::Spec->catdir($basedir, 'archive');
+ $desttmp = File::Spec->catdir($basedir, 'stage');
+ }
# verify mock gpgv
{
open my $gpgv,'-|',GPGV_BIN, '--version'