Migrate "loadable elf" test from hello_world example to test_apps

This commit is contained in:
Roland Dobai
2020-04-16 14:42:33 +02:00
parent 819f7a4e57
commit 2d709c6384
11 changed files with 105 additions and 42 deletions

View File

@@ -4,7 +4,7 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import unicode_literals
from io import open
from tiny_test_fw import Utility
import pexpect
@@ -19,10 +21,10 @@ import pexpect
class CustomProcess(object):
def __init__(self, cmd, logfile, verbose):
self.verbose = verbose
self.f = open(logfile, 'wb')
self.f = open(logfile, 'w')
if self.verbose:
Utility.console_log('Starting {} > {}'.format(cmd, self.f.name))
self.pexpect_proc = pexpect.spawn(cmd, timeout=60, logfile=self.f)
self.pexpect_proc = pexpect.spawn(cmd, timeout=60, logfile=self.f, encoding='utf-8')
def __enter__(self):
return self