Skip to content

Commit

Permalink
Deprecate symchk instead of removing it
Browse files Browse the repository at this point in the history
  • Loading branch information
scopatz committed Sep 2, 2017
1 parent ade9646 commit 6197daa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions release/smbchk.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"""Collects & diffs public symobls in libcyclus.so. Used to ensure stability
between versions. Now with 100% fewer vowels!
WARNING: this file is now deprecated. It is provided here for future use and
refactoring.
The following tasks may be useful:
# update the database to the most recent release tag
Expand Down Expand Up @@ -171,6 +174,7 @@ def check(db):


def main(args=None):
raise RuntimeError("Symbol checking has been deprecated!")
if os.name != 'posix':
sys.exit("must be run on a posix system, "
"'nm' utility not compatible elsewhere.")
Expand Down
5 changes: 5 additions & 0 deletions tests/test_smbchk.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from argparse import Namespace

import nose
from nose.plugins.deprecated import DeprecatedTest
from nose.tools import assert_equal, assert_true, assert_false, assert_raises, \
assert_in

Expand All @@ -21,13 +22,15 @@
smbchk = False

def test_load():
raise DeprecatedTest("symbol test has been deprecated")
if not smbchk:
return
ns = Namespace(filename=os.path.join(reldir, 'symbols.json'))
db = smbchk.load(ns)
assert_true(isinstance(db, list))

def test_nm():
raise DeprecatedTest("symbol test has been deprecated")
if platform.system() == 'Darwin':
skip_then_continue("Skipping for Mac")
if not smbchk:
Expand All @@ -39,6 +42,7 @@ def test_nm():
assert_in("cyclus::Agent::Agent(cyclus::Context*)", syms)

def test_diff():
raise DeprecatedTest("symbol test has been deprecated")
if not smbchk:
return
db = [{'symbols': ["cyclus::Agent::Agent(cyclus::Context*)"],
Expand All @@ -50,6 +54,7 @@ def test_diff():
assert_true(len(obs) > 0)

def test_check():
raise DeprecatedTest("symbol test has been deprecated")
if not smbchk:
return
# adds to API
Expand Down

0 comments on commit 6197daa

Please sign in to comment.