Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup cpp/test/Slice/errorDetection Testing #3252

Open
InsertCreativityHere opened this issue Dec 10, 2024 · 0 comments
Open

Cleanup cpp/test/Slice/errorDetection Testing #3252

InsertCreativityHere opened this issue Dec 10, 2024 · 0 comments

Comments

@InsertCreativityHere
Copy link
Member

I was checking the C++ Code Coverage report, and to my surprise, parts of slice2java were being hit! Same for the other compilers.

After some searching, it turns out that the cpp/Slice/errorDetection test actually runs all the compilers.
We have this little bit slapped on the end of our test script in that folder:

            current.write("Forward.ice... ")
            for language in [
                "cpp",
                "cs",
                "html",
                "java",
                "js",
                "matlab",
                "php",
                "py",
                "rb",
                "swift",
            ]:
                compiler = SliceTranslator("slice2%s" % language)
                if not os.path.isfile(compiler.getCommandLine(current)):
                    continue
                compiler.run(
                    current, args=["forward/Forward.ice", "--output-dir", "tmp"]
                )
  1. We should remove html from this list. slice2html is long dead. We should also remove this logic where we just silently skip any compilers that don't exist. If something in this list is bogus, we should obviously see an error for it.

  2. We're only testing the compilers over Forward.ice, a very small file: module test { class F; }.
    Either we should just completely remove this testing (because it is unexpected that a cpp test is running the other compilers).
    Or we should at least expand this testing and run the compilers on a less useless Slice file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant