firmware_tools/autobuild/Common_scripts/test/testresourceselector.groovy
2023-01-08 14:01:08 +00:00

23 lines
No EOL
629 B
Groovy

//To be called by the ethernet test script to query for a usable resource.
def LocateResources(AllTestEnvironmentPath,TargetHardware){
def AllTestEnvironements = readJSON(AllTestEnvironmentPath);
}
// GET
def DoGET(url){
def get = new URL(url).openConnection();
def getRC = get.getResponseCode();
if (getRC.equals(200)) {
def Response = get.getInputStream().getText();
}
else{
def Response = "Request Failed"
echo("REST: received ${getRC} from GET to ${url}");
}
echo("REST: received ${getRC} from GET to ${url}");
}
TestResourceUnpacker = this;
return this;