mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 586885 - Add raw host to robotium.config. r=jmaher
This commit is contained in:
parent
cc98fe019b
commit
355e9fdee1
@ -32,6 +32,7 @@ abstract class BaseTest extends ActivityInstrumentationTestCase2<Activity> {
|
||||
protected Assert mAsserter;
|
||||
protected Actions mActions;
|
||||
protected String mBaseUrl;
|
||||
protected String mRawBaseUrl;
|
||||
private String mTestType;
|
||||
private String mLogFile;
|
||||
protected String mProfile;
|
||||
@ -70,6 +71,7 @@ abstract class BaseTest extends ActivityInstrumentationTestCase2<Activity> {
|
||||
|
||||
mLogFile = (String)config.get("logfile");
|
||||
mBaseUrl = ((String)config.get("host")).replaceAll("(/$)", "");
|
||||
mRawBaseUrl = ((String)config.get("rawhost")).replaceAll("(/$)", "");
|
||||
}
|
||||
|
||||
public void setTestType(String type) {
|
||||
@ -172,6 +174,10 @@ abstract class BaseTest extends ActivityInstrumentationTestCase2<Activity> {
|
||||
return mBaseUrl + "/" + url.replaceAll("(^/)", "");
|
||||
}
|
||||
|
||||
protected final String getAbsoluteRawUrl(String url) {
|
||||
return mRawBaseUrl + "/" + url.replaceAll("(^/)", "");
|
||||
}
|
||||
|
||||
protected final boolean waitForTest(BooleanTest t, int timeout) {
|
||||
long end = SystemClock.uptimeMillis() + timeout;
|
||||
while (SystemClock.uptimeMillis() < end) {
|
||||
|
@ -62,12 +62,12 @@ class RemoteOptions(MochitestOptions):
|
||||
|
||||
self.add_option("--http-port", action = "store",
|
||||
type = "string", dest = "httpPort",
|
||||
help = "ip address where the remote web server is hosted at")
|
||||
help = "http port of the remote web server")
|
||||
defaults["httpPort"] = automation.DEFAULT_HTTP_PORT
|
||||
|
||||
self.add_option("--ssl-port", action = "store",
|
||||
type = "string", dest = "sslPort",
|
||||
help = "ip address where the remote web server is hosted at")
|
||||
help = "ssl port of the remote web server")
|
||||
defaults["sslPort"] = automation.DEFAULT_SSL_PORT
|
||||
|
||||
self.add_option("--pidfile", action = "store",
|
||||
@ -421,6 +421,7 @@ def main():
|
||||
fHandle.write("profile=%s\n" % (mochitest.remoteProfile))
|
||||
fHandle.write("logfile=%s\n" % (options.remoteLogFile))
|
||||
fHandle.write("host=http://mochi.test:8888/tests\n")
|
||||
fHandle.write("rawhost=http://%s:%s/tests\n" % (options.remoteWebServer, options.httpPort))
|
||||
fHandle.close()
|
||||
deviceRoot = dm.getDeviceRoot()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user