Stop creating test working dir
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/70f32210 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/70f32210 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/70f32210 Branch: refs/heads/master Commit: 70f322105cf0ed8a757422c4c06888c9b899fa41 Parents: 33f9460 Author: Nick Wellnhofer <[email protected]> Authored: Sat Dec 24 14:29:03 2016 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Mon Jan 2 16:33:57 2017 +0100 ---------------------------------------------------------------------- perl/buildlib/Lucy/Test/TestUtils.pm | 21 -------------------- perl/t/001-build_indexes.t | 33 ------------------------------- perl/t/999-remove_indexes.t | 25 ----------------------- 3 files changed, 79 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/70f32210/perl/buildlib/Lucy/Test/TestUtils.pm ---------------------------------------------------------------------- diff --git a/perl/buildlib/Lucy/Test/TestUtils.pm b/perl/buildlib/Lucy/Test/TestUtils.pm index 03f9f59..bcc9477 100644 --- a/perl/buildlib/Lucy/Test/TestUtils.pm +++ b/perl/buildlib/Lucy/Test/TestUtils.pm @@ -23,9 +23,6 @@ $VERSION = eval $VERSION; use Exporter 'import'; our @EXPORT_OK = qw( - working_dir - create_working_dir - remove_working_dir uscon_dir create_index create_uscon_index @@ -45,24 +42,6 @@ use File::Path qw( rmtree ); use File::Temp qw( tempdir ); use Carp; -my $working_dir = catfile( curdir(), 'lucy_test' ); - -# Return a directory within the system's temp directory where we will put all -# testing scratch files. -sub working_dir {$working_dir} - -sub create_working_dir { - mkdir( $working_dir, 0700 ) or die "Can't mkdir '$working_dir': $!"; -} - -# Verify that this user owns the working dir, then zap it. Returns true upon -# success. -sub remove_working_dir { - return unless -d $working_dir; - rmtree $working_dir; - return 1; -} - # Create a temporary test directory that will be removed at exit. sub init_test_index_loc { return tempdir( DIR => 't', CLEANUP => 1 ); http://git-wip-us.apache.org/repos/asf/lucy/blob/70f32210/perl/t/001-build_indexes.t ---------------------------------------------------------------------- diff --git a/perl/t/001-build_indexes.t b/perl/t/001-build_indexes.t deleted file mode 100644 index c1153d0..0000000 --- a/perl/t/001-build_indexes.t +++ /dev/null @@ -1,33 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -use strict; -use warnings; -use lib 'buildlib'; - -use Test::More tests => 2; -use File::Spec::Functions qw( catfile ); -use File::Find qw( find ); -use Lucy::Test::TestUtils qw( - working_dir - create_working_dir - remove_working_dir -); - -remove_working_dir(); -ok( !-e working_dir(), "Working dir doesn't exist" ); -create_working_dir(); -ok( -e working_dir(), "Working dir successfully created" ); - http://git-wip-us.apache.org/repos/asf/lucy/blob/70f32210/perl/t/999-remove_indexes.t ---------------------------------------------------------------------- diff --git a/perl/t/999-remove_indexes.t b/perl/t/999-remove_indexes.t deleted file mode 100644 index 880ae41..0000000 --- a/perl/t/999-remove_indexes.t +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -use strict; -use warnings; -use lib 'buildlib'; - -use Test::More tests => 1; -use Lucy::Test::TestUtils qw( remove_working_dir working_dir ); - -remove_working_dir(); -ok( !-e working_dir(), "working_dir is no more" ); -
