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

rust: new target "ninja rustdoc" #14213

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bonzini
Copy link
Collaborator

@bonzini bonzini commented Jan 31, 2025

Another rust tool, another copy of roughly the same code as clippy and rustfmtb but with slightly different command lines. Other unique points are that the output is in a directory, so print that on successful execution of rustdoc, and that test targets are skipped.

@bonzini bonzini requested a review from jpakkane as a code owner January 31, 2025 15:16
@bonzini bonzini added this to the 1.8 milestone Jan 31, 2025
@nirbheek
Copy link
Member

nirbheek commented Feb 2, 2025

Bionic test failure is relevant:

=================================== FAILURES ===================================
________________________ AllPlatformTests.test_rustdoc _________________________
[gw0] linux -- Python 3.7.5 /usr/bin/python3

self = <unittests.allplatformstests.AllPlatformTests testMethod=test_rustdoc>

    @skip_if_not_language('rust')
    @unittest.skipIf(not shutil.which('rustdoc'), 'Test requires rustdoc')
    def test_rustdoc(self) -> None:
        if self.backend is not Backend.ninja:
            raise unittest.SkipTest('Rust is only supported with ninja currently')
        try:
            with tempfile.TemporaryDirectory() as tmpdir:
                testdir = os.path.join(tmpdir, 'a')
                shutil.copytree(os.path.join(self.rust_test_dir, '9 unit tests'),
                                testdir)
                self.init(testdir)
>               self.build('rustdoc')
E               subprocess.CalledProcessError: Command '['/ci/ninja', '-d', 'explain', '-w', 'dupbuild=err', 'rustdoc']' returned non-zero exit status 1.

unittests/allplatformstests.py:4898: CalledProcessError

Another rust tool, another copy of roughly the same code as clippy and
rustfmt.  Apart from the slightly different command lines, the output
is in a directory and test targets are skipped.

Knowing the output directory can be useful, so print that on successful
execution of rustdoc.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
@bonzini
Copy link
Collaborator Author

bonzini commented Feb 3, 2025

Bionic test failure is relevant:

Yes, I was assuming too new a rustc version. Fixed now, and also the Windows failure which is caused by -l not existing in rustdoc.

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

Successfully merging this pull request may close these issues.

2 participants