summaryrefslogtreecommitdiff
path: root/unittests/autotestscripts_graphics
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/autotestscripts_graphics')
-rw-r--r--unittests/autotestscripts_graphics/keyimages/abovewater.tgabin0 -> 2359314 bytes
-rw-r--r--unittests/autotestscripts_graphics/keyimages/belowwater.tgabin0 -> 2359314 bytes
-rw-r--r--unittests/autotestscripts_graphics/keyimages/mat_fullbright_1.tgabin0 -> 2359314 bytes
-rw-r--r--unittests/autotestscripts_graphics/keyimages/mat_fullbright_2.tgabin0 -> 2359314 bytes
-rw-r--r--unittests/autotestscripts_graphics/keyimages/mat_luxels_1.tgabin0 -> 2359314 bytes
-rw-r--r--unittests/autotestscripts_graphics/keyimages/mat_showmiplevels_1.tgabin0 -> 2359314 bytes
-rw-r--r--unittests/autotestscripts_graphics/keyimages/mat_showmiplevels_2.tgabin0 -> 2359314 bytes
-rw-r--r--unittests/autotestscripts_graphics/keyimages/mat_wireframe_1.tgabin0 -> 2359314 bytes
-rw-r--r--unittests/autotestscripts_graphics/rendering_regression_test.pl36
9 files changed, 36 insertions, 0 deletions
diff --git a/unittests/autotestscripts_graphics/keyimages/abovewater.tga b/unittests/autotestscripts_graphics/keyimages/abovewater.tga
new file mode 100644
index 0000000..9700ce3
--- /dev/null
+++ b/unittests/autotestscripts_graphics/keyimages/abovewater.tga
Binary files differ
diff --git a/unittests/autotestscripts_graphics/keyimages/belowwater.tga b/unittests/autotestscripts_graphics/keyimages/belowwater.tga
new file mode 100644
index 0000000..5641376
--- /dev/null
+++ b/unittests/autotestscripts_graphics/keyimages/belowwater.tga
Binary files differ
diff --git a/unittests/autotestscripts_graphics/keyimages/mat_fullbright_1.tga b/unittests/autotestscripts_graphics/keyimages/mat_fullbright_1.tga
new file mode 100644
index 0000000..ce60746
--- /dev/null
+++ b/unittests/autotestscripts_graphics/keyimages/mat_fullbright_1.tga
Binary files differ
diff --git a/unittests/autotestscripts_graphics/keyimages/mat_fullbright_2.tga b/unittests/autotestscripts_graphics/keyimages/mat_fullbright_2.tga
new file mode 100644
index 0000000..ef516c5
--- /dev/null
+++ b/unittests/autotestscripts_graphics/keyimages/mat_fullbright_2.tga
Binary files differ
diff --git a/unittests/autotestscripts_graphics/keyimages/mat_luxels_1.tga b/unittests/autotestscripts_graphics/keyimages/mat_luxels_1.tga
new file mode 100644
index 0000000..80e5bd1
--- /dev/null
+++ b/unittests/autotestscripts_graphics/keyimages/mat_luxels_1.tga
Binary files differ
diff --git a/unittests/autotestscripts_graphics/keyimages/mat_showmiplevels_1.tga b/unittests/autotestscripts_graphics/keyimages/mat_showmiplevels_1.tga
new file mode 100644
index 0000000..ac2b726
--- /dev/null
+++ b/unittests/autotestscripts_graphics/keyimages/mat_showmiplevels_1.tga
Binary files differ
diff --git a/unittests/autotestscripts_graphics/keyimages/mat_showmiplevels_2.tga b/unittests/autotestscripts_graphics/keyimages/mat_showmiplevels_2.tga
new file mode 100644
index 0000000..04af7cb
--- /dev/null
+++ b/unittests/autotestscripts_graphics/keyimages/mat_showmiplevels_2.tga
Binary files differ
diff --git a/unittests/autotestscripts_graphics/keyimages/mat_wireframe_1.tga b/unittests/autotestscripts_graphics/keyimages/mat_wireframe_1.tga
new file mode 100644
index 0000000..862b241
--- /dev/null
+++ b/unittests/autotestscripts_graphics/keyimages/mat_wireframe_1.tga
Binary files differ
diff --git a/unittests/autotestscripts_graphics/rendering_regression_test.pl b/unittests/autotestscripts_graphics/rendering_regression_test.pl
new file mode 100644
index 0000000..a29bd57
--- /dev/null
+++ b/unittests/autotestscripts_graphics/rendering_regression_test.pl
@@ -0,0 +1,36 @@
+use Cwd;
+
+my $dir = getcwd;
+
+chdir "../../../game";
+
+if( 1 )
+{
+ system "rd /s /q ep2\\screenshots";
+ system "mkdir ep2\\screenshots";
+ @output = `hl2.exe -allowdebug -autoconfig -console -toconsole -dev -sw -width 1024 -game ep2 -testscript rendering_regression_test.vtest`;
+}
+
+$keydir = "\\\\fileserver\\user\\rendering_regression_test";
+
+open TESTSCRIPT, "<ep2/testscripts/rendering_regression_test.vtest" || die;
+foreach $line (<TESTSCRIPT>)
+{
+ $line =~ s,//.*,,g; # remove comments
+ if( $line =~ m/\s*screenshot\s+(.*)$/i )
+ {
+ push @screenshots, $1;
+ }
+}
+close TESTSCRIPT;
+
+foreach $screenshot (@screenshots)
+{
+ $cmd = "tgamse $keydir\\$screenshot.tga ep2\\screenshots\\$screenshot.tga 0";
+ $output = `$cmd`;
+ if( $output =~ m/FAIL/ )
+ {
+ $cmd = "tgadiff $keydir\\$screenshot.tga ep2\\screenshots\\$screenshot.tga ep2\\screenshots\\$screenshot" . "_diff.tga";
+ system $cmd;
+ }
+}