Skip to content

Commit

Permalink
Fix tests after get_data_path() removal
Browse files Browse the repository at this point in the history
get_data_path() was removed from Avocado API. Also,
a new asset fetcher API was introduced in Avocado.

Given those changes, this patch fixes #4 removing
the need of get_data_path() in tests and also
takes advantage of the asset fetcher to drop the
tarballs from our repository.

Signed-off-by: Amador Pahim <[email protected]>
  • Loading branch information
apahim committed Apr 5, 2016
1 parent 53559bc commit cabf91c
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 1,543 deletions.
7 changes: 2 additions & 5 deletions perf/aiostress.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python

import os
import shutil

from avocado import Test
from avocado import main
Expand All @@ -20,12 +19,10 @@ def setUp(self):
Source:
https://oss.oracle.com/~mason/aio-stress/aio-stress.c
"""
aiostress_c = self.params.get('aiostress_c', default='aio-stress.c')
c_path = self.get_data_path(aiostress_c)
shutil.copy(c_path, self.srcdir)
aiostress = self.fetch_asset('https://oss.oracle.com/~mason/aio-stress/aio-stress.c')
os.chdir(self.srcdir)
# This requires libaio.h in order to build
process.run('gcc -Wall -laio -lpthread -o aio-stress %s' % aiostress_c)
process.run('gcc -Wall -laio -lpthread -o aio-stress %s' % aiostress)

def test(self):
"""
Expand Down
Loading

0 comments on commit cabf91c

Please sign in to comment.