Index: www.reactos.org/testman/detail.php =================================================================== --- www.reactos.org/testman/detail.php (revision 968) +++ www.reactos.org/testman/detail.php (working copy) @@ -37,7 +37,7 @@ $module_urls = array(); $search_urls = array("rostests/winetests", "rostests/apitests"); - + $search_kmtests = array ("Cc", "Cm", "Ex", "Io", "Ke", "Mm", "Ob", "Po", "Ps", "Se"); // Get information about this result $stmt = $dbh->prepare( "SELECT UNCOMPRESS(l.log) log, e.status, e.count, e.failures, e.skipped, e.todo, e.time, s.module, s.test, UNIX_TIMESTAMP(r.timestamp) timestamp, r.revision, r.platform, src.name, r.comment " . @@ -81,10 +81,81 @@ { global $search_urls; + //1. Check if it is a kmtest. I.e: $module=kmtest. $file=Xxfile.c + if ($module == 'kmtest') + { + //Use the name of the file to discover which folder the test belongs + $kmgroup = substr($file, 0, 2); + + if (in_array ($kmgroup, $search_kmtests)){ + return "/rostests/kmtests/ntos_" . $kmgroup . "/"; + } + + //Oh no! It is not one of the tests properly grouped. So grouping as follows: + //FinXXXX.c->kernel32, FsRXXX.c->novp_fsrtl||ntos_fsrtl, NpfXXXX.c->npfs, RtlXXX.c->rtl + $kmwild = substr($file, 0, 3); + + switch ($kmwild) + { + case "Fin" : + return "/rostests/kmtests/kernel32/"; + + case "FsR" : + //It can belong to novp_fsrtl or ntos_fsrtl + $FsRtl_urls = array("rostests/kmtests/novp_fsrtl", "rostests/kmtests/ntos_fsrtl"); + foreach ($FsRtl_urls as $surl) + { + $http_header = @get_headers(VIEWVC_TRUNK."/$surl/$file"); + if ($http_header[0] == 'HTTP/1.1 404 Not Found') + continue; + + return "/$surl/"; + } + + case "Npf" : + //Path to file expected: VIEWVC_TRUNK/rostests/kmtests/npfs + return "/rostests/kmtests/npfs/"; + + case "Rtl" : + //Path to file expected: VIEWVC_TRUNK/rostests/kmtests/rtl + return "/rostests/kmtests/rtl/"; + } + } + + //2. Check if it is a win32knt test. I.e: $module=win32knt $file=Nt((Gdi)||(GdiDd)||(User))file + if ($module == 'win32knt') + { + //Use the name of the file to discover which folder the test belongs + if(substr ($file, 0, 7) == 'NtGdiDd') + { + //Then it belongs to ntdd folder + //Path to file expected: VIEWVC_TRUNK/rostests/apitests/win32nt/ntdd + return "/rostests/apitests/win32nt/ntdd/"; + } + + if(substr($file, 0, 5) == 'NtGdi') + { + //Then it belongs to ntgdi folder + return "/rostests/apitests/win32nt/ntgdi/"; + } + + if(substr($file, 0, 6) == 'NtUser') + { + //Then it belongs to ntuser folder + return "/rostests/apitests/win32nt/ntuser/"; + } + } + + //3. Check if it is a CRT test. 3 flavours: crtdll_crt, ntdll_crt, msvcrt_crt + if (substr($module, -4) == '_crt') + { + return "/rostests/apitests/crt/"; + } + + //4. ..Then is it a rostests/apitests or a rostests/winetests? foreach ($search_urls as $surl) { $http_header = @get_headers(VIEWVC_TRUNK."/$surl/$module/$file"); - if ($http_header[0] == 'HTTP/1.1 404 Not Found') continue;