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

Fix 1471 sony2010 0.27 #1476

Merged
merged 4 commits into from
Feb 19, 2021
Merged

Fix 1471 sony2010 0.27 #1476

merged 4 commits into from
Feb 19, 2021

Conversation

clanmills
Copy link
Collaborator

See #1471 and #1472

@LeoHsiao1 or @D4N. Can you help me with the test suite, please. I changed timeout in suite.conf. I can't figure how to set that from test_issue_1472.py. The command exiv2 in takes about 8 seconds to run. I would prefer to retain the default (2 seconds) in suite.conf and set timeout=20 in test_issue_1472.py. Setting timeout is mentioned in README-TESTS.md and I'll update the documentation when I know how to set it from a script.

I think you're going to have to trust me about the C++ change, because this fix deals with writing Sony ciphered metadata data. The change is deep down down in the code to rewriting an image.

@LeoHsiao1
Copy link
Contributor

LeoHsiao1 commented Feb 19, 2021

As far as I can see, you can only set the global timeout in suite.conf, not in each test case. Because the timeout value is read only once in system_tests.py:

exiv2/tests/system_tests.py

Lines 192 to 194 in 443944d

_parameters["timeout"] = config.getfloat(
"General", "timeout", fallback=1.0
)

Perhaps, you can modify the configuration temporarily:

from system_tests import _parameters

class test_issue_1472Test(metaclass=CaseMeta):

    commands  = ...

    
    def setUp(self):
        print('Start executing the test case')
        self.timeout_bak = _parameters["timeout"]
        _parameters["timeout"] = 20.0

    def tearDown(self):
        print('End executing the test case')
        _parameters["timeout"] = self.timeout_bak 

@clanmills
Copy link
Collaborator Author

clanmills commented Feb 19, 2021

Thanks, @LeoHsiao1. I can't get that to work. I'm surprised. I'd like to painlessly modify timeout for the life of one test with code such as:

# -*- coding: utf-8 -*-

from system_tests import CaseMeta, CopyTmpFiles, path, timeout
@CopyTmpFiles("$data_path/test_issue_1472.jpg")

class test_issue_1472Test(metaclass=CaseMeta):

    timeout = 20
    
    filename  = path("$tmp_path/test_issue_1472.jpg")
...

I don't know that globally modifying the timeout makes sense because we don't know the order in which the tests will be executed. Any, if it's possible, it could be code such as:

# -*- coding: utf-8 -*-

import system_tests
system_tests.timeout = 20

from system_tests import CaseMeta, CopyTmpFiles, path
...

If @D4N doesn't respond, I'll leave the 20.0 in tests/suite.conf


Very pleased to say that Exiv2 v0.27.4-RC1 looks on track to ship on 2021-03-31 with your pythonic bash_tests. Great Work, @LeoHsiao1

darktable have requested bmff support (.CR3, .HEIC and .AVIF). Several new contributors have worked on v0.27.4 which is scheduled for release on 2021-05-22. Thanks in particular go to @kmilos, @hassec and @alexvanderberkel The book will finally be finished at the same time.

@clanmills clanmills merged commit c6de72f into 0.27-maintenance Feb 19, 2021
@clanmills clanmills deleted the fix_1471_sony2010_0.27 branch February 19, 2021 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants