Patch against trunk (svn 9147) 1st patch: SGE.pm (oscar/packages/sge/scripts/SGE.pm) This patch fixes the search path for test_sge is $ENV{OSCAR_HOME} is not defined (typicaly when installed from a linux distribution package) This fix may not be the good one, but it is the simplest one for now. 2nd patch: fixes oscar/scripts/test_cluster so it can find test programs.
Problem: if Oscar is installed from tarballs, package and test scripts are located under the same tree: PKG: OSCAR_HOME}/packages/$pkg TEST: SCAR_HOME}/packages/$pkg/testing/ if Oscar is installed from linux distribution packages, package and test scripts are not located at the same place: PKG: /var/lib/oscar/packages/$pkg TEST: /var/lib/oscar/testing/$pkg/$test @OSCAR::PackagePath::PKG_SOURCE_LOCATIONS points to PGK repository and cannot be used for fetching tests programs. If we redefine this variable, then we need to path Oscar code at many places. Some test programs are also placed here: /usr/share/oscar/testing/ So before committing this patch, it may be easier to decide were test programs are and place all of them in a unique and logic location (and patch once for all). Best regards, Olivier. PS: With this patch test_cluster can run the packages tests: [r...@is005760 testing]# (cd /usr/share/oscar/testing ; ./test_cluster) Performing root tests... /home mounts [PASSED] Preparing user tests... Performing user tests... SSH ping test [PASSED] SSH server->node [PASSED] SSH node->server [PASSED] SGE test [PASSED] X11 connection rejected because of wrong authentication. X11 connection rejected because of wrong authentication. X11 connection rejected because of wrong authentication. LAM/MPI (via SGE) [PASSED] X11 connection rejected because of wrong authentication. X11 connection rejected because of wrong authentication. X11 connection rejected because of wrong authentication. MPICH (via SGE) [FAILED] X11 connection rejected because of wrong authentication. X11 connection rejected because of wrong authentication. X11 connection rejected because of wrong authentication. Open MPI (via SGE) [FAILED] Ganglia setup test [FAILED] PVM (via SGE) [FAILED] oscartst has deleted job 9 now, I'm looking at tests failures. -- Olivier LAHAYE CEA Saclay DRT-LIST-DETECS-SSTM
Index: packages/sge/scripts/SGE.pm =================================================================== --- packages/sge/scripts/SGE.pm (révision 9147) +++ packages/sge/scripts/SGE.pm (copie de travail) @@ -15,18 +15,25 @@ use strict; use XML::Simple; +my $displayname = "SGE"; +my $test = "sge_test"; +my $jobscript = "sge_script"; my $pkg = "sge"; -my $pkg_dir = "$ENV{OSCAR_HOME}/packages/$pkg"; +my $pkg_dir; + +if (defined $ENV{OSCAR_HOME}) { + $pkg_dir = "$ENV{OSCAR_HOME}/packages/$pkg"; + $test = "$pkg_dir/testing/$test"; +} else { + $pkg_dir = "/var/lib/oscar/packages/$pkg"; + $test = "/var/lib/oscar/testing/$pkg/$test" +} my $pkg_config = "$pkg_dir/config.xml"; my $xml_ref = undef; my $xs = new XML::Simple(); $xml_ref = eval { $xs->XMLin( $pkg_config ); }; -my $displayname = "SGE"; -my $test = "sge_test"; -my $jobscript = "sge_script"; - # First set of data our $id = { @@ -34,7 +41,7 @@ pkg => $pkg, major => $xml_ref->{version}->{major}, minor => $xml_ref->{version}->{minor}, - test => "$pkg_dir/testing/$test", + test => "$test", jobscript => "$jobscript", gui => "qmon", };
Index: testing/test_cluster =================================================================== --- testing/test_cluster (révision 9147) +++ testing/test_cluster (copie de travail) @@ -228,12 +228,15 @@ # Copy the packages test files to the user home dir. foreach my $pkg (@pkgs) { - foreach my $dir (@OSCAR::PackagePath::PKG_SOURCE_LOCATIONS) { - if (-d "$dir/$pkg/testing") { +# foreach my $dir (@OSCAR::PackagePath::PKG_SOURCE_LOCATIONS) { + foreach my $dir ("/var/lib/oscar/testing") { +# if (-d "$dir/$pkg/testing") { + if (-d "$dir/$pkg") { mkdir("$test_user_homedir/$pkg/"); # I know, shell badness, but so much easier than doing # a recursive thing in perl. - system("cp -af $dir/$pkg/testing/* $test_user_homedir/$pkg/"); +# system("cp -af $dir/$pkg/testing/* $test_user_homedir/$pkg/"); + system("cp -af $dir/$pkg/* $test_user_homedir/$pkg/"); } } }
Verbosity: 10 ============================================================================= == oscar_wizard: Starting... ============================================================================= Detected distro: centos-5-x86_64 Setup Distros: [ centos-5-x86_64 ] Array: 1 element(s) Oscar version: 6.0.5r9147M ============================================================================= == Running step 8 of the OSCAR wizard: Test cluster setup ============================================================================= --> Step 8: Running tests: cd /usr/share/oscar/testing/ && xterm -T 'OSCAR Test Cluster Setup' -n 'OSCAR Test Cluster Setup' -geometry 80x47 -sl 500 -e ./test_cluster --wait --> Step 8: Not waiting for completion ============================================================================= == oscar_wizard: Exit =============================================================================
------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev
_______________________________________________ Oscar-devel mailing list Oscar-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oscar-devel