Commit b42610fb by Ben Clayton

regres: Automatically build dEQP based on new config file

Keeps the test lists and version of dEQP in sync. Also helps reproducibility by removing another set of external environment flags. Bug: b/140172528 Change-Id: Ib595a1c0c69ffedbfa7848ce8a31c3927bd78980 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/37448 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 992bf9d4
diff --git a/.gitignore b/.gitignore
index d6c5c502b..d22bff565 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
!.editorconfig
!.travis.yml
!.github
+/build/
\ No newline at end of file
diff --git a/framework/platform/lnx/X11/tcuLnxX11.cpp b/framework/platform/lnx/X11/tcuLnxX11.cpp
index dfe09d060..b4493e431 100644
--- a/framework/platform/lnx/X11/tcuLnxX11.cpp
+++ b/framework/platform/lnx/X11/tcuLnxX11.cpp
@@ -24,6 +24,7 @@
#include "tcuLnxX11.hpp"
#include "gluRenderConfig.hpp"
#include "deMemory.h"
+#include "deThread.hpp"
#include <X11/Xutil.h>
@@ -80,10 +81,14 @@ XlibDisplay::XlibDisplay (EventState& eventState, const char* name)
// a multi-threaded program calls, and it must complete before any other
// Xlib call is made.
DE_CHECK_RUNTIME_ERR(XInitThreads() != 0);
- m_display = XOpenDisplay((char*)name); // Won't modify argument string.
+ for (int i = 0; i < 10; i++) {
+ m_display = XOpenDisplay((char*)name); // Won't modify argument string.
+ if (m_display)
+ break;
+ deSleep(100*(1+i));
+ }
if (!m_display)
throw ResourceError("Failed to open display", name, __FILE__, __LINE__);
-
m_deleteAtom = XInternAtom(m_display, "WM_DELETE_WINDOW", False);
}
{
"remote": "git@gitlab.khronos.org:Tracker/vk-gl-cts.git",
"sha": "76a2b81e0ca86a65a927892ee4340bc6685e86b3",
"patches": [
"tests/regres/deqp-patches/deqp-x11.patch"
]
}
\ No newline at end of file
...@@ -120,7 +120,7 @@ func Checkout(path, url string, commit Hash) error { ...@@ -120,7 +120,7 @@ func Checkout(path, url string, commit Hash) error {
for _, cmds := range [][]string{ for _, cmds := range [][]string{
{"init"}, {"init"},
{"remote", "add", "origin", url}, {"remote", "add", "origin", url},
{"fetch", "origin", commit.String()}, {"fetch", "origin", "--depth=1", commit.String()},
{"checkout", commit.String()}, {"checkout", commit.String()},
} { } {
if err := shell.Shell(gitTimeout, exe, path, cmds...); err != nil { if err := shell.Shell(gitTimeout, exe, path, cmds...); err != nil {
...@@ -132,6 +132,11 @@ func Checkout(path, url string, commit Hash) error { ...@@ -132,6 +132,11 @@ func Checkout(path, url string, commit Hash) error {
return nil return nil
} }
// Apply applys the patch file to the git repo at dir.
func Apply(dir, patch string) error {
return shell.Shell(gitTimeout, exe, dir, "apply", patch)
}
// FetchRefHash returns the git hash of the given ref. // FetchRefHash returns the git hash of the given ref.
func FetchRefHash(ref, url string) (Hash, error) { func FetchRefHash(ref, url string) (Hash, error) {
out, err := shell.Exec(gitTimeout, exe, "", nil, "ls-remote", url, ref) out, err := shell.Exec(gitTimeout, exe, "", nil, "ls-remote", url, ref)
......
...@@ -84,9 +84,7 @@ func (l Lists) Hash() string { ...@@ -84,9 +84,7 @@ func (l Lists) Hash() string {
if err := gob.NewEncoder(h).Encode(l); err != nil { if err := gob.NewEncoder(h).Encode(l); err != nil {
panic(cause.Wrap(err, "Could not encode testlist to produce hash")) panic(cause.Wrap(err, "Could not encode testlist to produce hash"))
} }
var hash [20]byte return hex.EncodeToString(h.Sum(nil))
copy(hash[:], h.Sum(nil))
return hex.EncodeToString(hash[:])
} }
// Load loads the test list json file and returns the full set of tests. // Load loads the test list json file and returns the full set of tests.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment