
https://svn.lrde.epita.fr/svn/ranch/trunk Index: ChangeLog from Nicolas Desprès <nicolas.despres@lrde.epita.fr> Group system by hostname. * web/ranch/app/controllers/benches_controller.rb: Group system by hostname. * web/ranch/test/functional/benches_controller_test.rb: Test it. * web/ranch/test/fixtures/inputs.yml, * web/ranch/test/fixtures/outputs.yml, * web/ranch/test/fixtures/systems.yml: Add bench with twice the same system hostname. app/controllers/benches_controller.rb | 2 - test/fixtures/inputs.yml | 11 ++++++ test/fixtures/outputs.yml | 24 ++++++++++++++ test/fixtures/systems.yml | 48 +++++++++++++++++++++++++++-- test/functional/benches_controller_test.rb | 18 ++++++++++ 5 files changed, 100 insertions(+), 3 deletions(-) Index: web/ranch/test/functional/benches_controller_test.rb --- web/ranch/test/functional/benches_controller_test.rb (revision 60) +++ web/ranch/test/functional/benches_controller_test.rb (working copy) @@ -58,6 +58,7 @@ assert_not_nil assigns(:output_arg_num) assert_not_nil assigns(:inputs) assert_not_nil assigns(:input_set_num) + assert_not_nil assigns(:systems) assert_kind_of Hash, assigns(:revision) assert_equal 2, assigns(:revision)[:start] assert_equal 8, assigns(:revision)[:stop] @@ -77,6 +78,7 @@ assert_not_nil assigns(:output_arg_num) assert_not_nil assigns(:inputs) assert_not_nil assigns(:input_set_num) + assert_not_nil assigns(:systems) assert_kind_of Hash, assigns(:revision) assert_equal 1, assigns(:revision)[:start] assert_equal assigns(:project).head_revision, assigns(:revision)[:stop] @@ -97,6 +99,7 @@ assert_not_nil assigns(:output_arg_num) assert_not_nil assigns(:inputs) assert_not_nil assigns(:input_set_num) + assert_not_nil assigns(:systems) assert_not_nil flash[:error] end @@ -115,6 +118,7 @@ assert_equal 3, assigns(:output_arg_nb) assert_not_nil assigns(:inputs) assert_not_nil assigns(:input_set_num) + assert_not_nil assigns(:systems) assert_nil flash[:error] end @@ -132,7 +136,21 @@ assert_not_nil assigns(:output_arg_num) assert_not_nil assigns(:inputs) assert_not_nil assigns(:input_set_num) + assert_not_nil assigns(:systems) assert_not_nil flash[:error] end + def test_systems_list_is_grouped_by_hostname + get :regression, { :bench_id => 2 } + assert_response :success + assert_template 'regression' + + assert_not_nil assigns(:project) + assert_not_nil assigns(:bench) + assert_not_nil assigns(:output_arg_num) + assert_not_nil assigns(:inputs) + assert_not_nil assigns(:systems) + assert 2, assigns(:systems).size + end + end Index: web/ranch/test/fixtures/inputs.yml --- web/ranch/test/fixtures/inputs.yml (revision 60) +++ web/ranch/test/fixtures/inputs.yml (working copy) @@ -29,3 +29,14 @@ set_num += 1 end %> + +# Generate a set of quotient inputs. + +quotient_nb_state_1_1: + id: <%= id += 1 %> + name: nb_state + unit: "" + value: 42 + bench_id: 2 + arg_num: 1 + set_num: 0 Index: web/ranch/test/fixtures/outputs.yml --- web/ranch/test/fixtures/outputs.yml (revision 60) +++ web/ranch/test/fixtures/outputs.yml (working copy) @@ -31,3 +31,27 @@ end %> <% end %> + +# Outputs for the quotient (id = 2) bench. + +quotient_r1_utime_1: + id: <%= id += 1 %> + name: utime + unit: sec + value: 5 + bench_id: 2 + arg_num: 1 + set_num: 0 + system_id: 1 + revision: 1 + +quotient_r2_utime_1: + id: <%= id += 1 %> + name: utime + unit: sec + value: 10 + bench_id: 2 + arg_num: 1 + set_num: 0 + system_id: 2 + revision: 2 Index: web/ranch/test/fixtures/systems.yml --- web/ranch/test/fixtures/systems.yml (revision 60) +++ web/ranch/test/fixtures/systems.yml (working copy) @@ -1,8 +1,8 @@ <% id = 0 %> -ouagadougou: +ouagadougou1: id: <%= id += 1 %> - hostname: ouagadougou.lrde.epita.fr + hostname: ouagadougou kernel_name: Linux kernel_revision: "2.4.27-2-k7" kernel_version: "#1 Tue Aug 16 17:30:14" @@ -44,6 +44,50 @@ This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +ouagadougou2: + id: <%= id += 1 %> + hostname: ouagadougou + kernel_name: Linux + kernel_revision: "2.4.27-2-k7" + kernel_version: "#1 Tue Aug 16 17:30:14" + host_type: i686 + os_name: GNU/Linux + comp_name: g++ + comp_version: 4.0.3 + comp_flags: -02 -W -Wall + mem_size: 256664 + cpu_name: "AMD Athlon(tm) XP 2000+" + cpu_frequency: 3000.00 + info: | + Running action system + SYSTEM UNAME: CYGWIN_NT-5.1 pau 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 unknown unknown Cygwin + BUILD DATE: Mon Nov 14 10:13:51 2005 + BUILD SHORTDATE: 14/11 10:13 + HIGHEST SVN REVISION: 26 + BUILD REVISION: 6 + PKG_CONFIG_PATH: + PATH: /cygdrive/d/build_farm/prefix/monoburg/bin:/usr/local/bin:/bin:/cygdrive/c/ghc/ghc-6.4/bin:/cygdrive/c/program files/imagemagick-6.2.5-q16:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Program Files/Intel/DMIX:/bin + BF_DEPS: + + CFLAGS: + CXXFLAGS: + CC: ccache gcc + CXX: ccache g++ + CONFIGURE OPTIONS: --prefix=/cygdrive/d/build_farm/prefix/ranch + DISTCHECK_CONFIGURE_FLAGS: + + --- gcc (/bin/gcc) --- + gcc (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) + Copyright (C) 2004 Free Software Foundation, Inc. + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + --- g++ (/bin/g++) --- + g++ (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) + Copyright (C) 2004 Free Software Foundation, Inc. + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + vaucanson: id: <%= id += 1 %> hostname: vaucanson Index: web/ranch/app/controllers/benches_controller.rb --- web/ranch/app/controllers/benches_controller.rb (revision 60) +++ web/ranch/app/controllers/benches_controller.rb (working copy) @@ -34,7 +34,7 @@ FROM systems, outputs WHERE systems.id = outputs.system_id AND outputs.bench_id = #{@bench.id} - GROUP BY systems.id + GROUP BY systems.hostname ORDER BY systems.hostname) if params[:revision].nil? or params[:revision][:range].nil? @revision = {}