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:
parent
28adf6fd96
commit
6b5ecf3afb
7 changed files with 77 additions and 11 deletions
|
@ -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(', ')
|
||||
))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue