1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 02:09:32 +02:00

Nexus 9 support. Home button doesn't work, presumably due to auto-unlocking.

This commit is contained in:
Simo Kinnunen 2014-11-08 13:15:30 +09:00 committed by Kinnunen Simo
parent 28adf6fd96
commit 6b5ecf3afb
7 changed files with 77 additions and 11 deletions

View file

@ -1,4 +1,6 @@
var path = require('path')
var fs = require('fs')
var util = require('util')
// Export
module.exports.root = function(target) {
@ -19,3 +21,17 @@ module.exports.vendor = function(target) {
module.exports.module = function(target) {
return path.resolve(__dirname, '../../node_modules', target)
}
// Export
module.exports.requiredMatch = function(candidates) {
for (var i = 0, l = candidates.length; i < l; ++i) {
if (fs.existsSync(candidates[i])) {
return candidates[i]
}
}
throw new Error(util.format(
'At least one of these paths should exist: %s'
, candidates.join(', ')
))
}