contrib: Build octphy osmo-bts variant and make it generic

This is a first step to add support for osmo-bts-octpy to
osmo-gsm-tester.
There's no point in building separate insts for different osmo-bts
variants which run on the main unit and which come from the same git
repository, this we make the osmo-bts-trx one generic to handle all
variants which fall into the description above.

Tested locally on my laptop that it builds susccessfully.

Once this patch is applied, jenkins jobs need to be adjusted:
- RnD: osmo-gsm-tester_manual-build-all
- Prod: osmo-gsm-tester_build-osmo-bts-trx (and rename it)

Change-Id: Ib8814e4ce49596b586990f20d7d625a719852e90
diff --git a/contrib/jenkins-build-osmo-bts-trx.sh b/contrib/jenkins-build-osmo-bts.sh
similarity index 61%
rename from contrib/jenkins-build-osmo-bts-trx.sh
rename to contrib/jenkins-build-osmo-bts.sh
index 6188be1..7349ce5 100755
--- a/contrib/jenkins-build-osmo-bts-trx.sh
+++ b/contrib/jenkins-build-osmo-bts.sh
@@ -1,14 +1,15 @@
 #!/bin/sh
 set -e -x
 base="$PWD"
-name="osmo-bts-trx"
+name="osmo-bts"
 . "$(dirname "$0")/jenkins-build-common.sh"
 
 # for gsm_data_shared.*
 have_repo openbsc
+have_repo octphy-2g-headers
 
 build_repo libosmocore --disable-doxygen
 build_repo libosmo-abis
-build_repo osmo-bts --enable-trx --with-openbsc=$base/openbsc/openbsc/include
+build_repo osmo-bts --enable-trx --with-openbsc=$base/openbsc/openbsc/include --enable-octphy --with-octsdr-2g=$base/octphy-2g-headers
 
-create_bin_tgz osmo-bts-trx
+create_bin_tgz osmo-bts-trx osmo-bts-octphy
diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py
index 6130ca9..f53b8a3 100644
--- a/src/osmo_gsm_tester/bts_osmotrx.py
+++ b/src/osmo_gsm_tester/bts_osmotrx.py
@@ -84,7 +84,7 @@
             self.log('Waiting for osmo-trx to start up...')
             event_loop.wait(self, self.trx.trx_ready)
 
-        self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst(OsmoBtsTrx.BIN_BTS_TRX)))
+        self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-bts')))
         lib = self.inst.child('lib')
         if not os.path.isdir(lib):
             raise RuntimeError('No lib/ in %r' % self.inst)