Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asapo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joao Alvim Oliveira Dias De Almeida
asapo
Commits
977191ca
Commit
977191ca
authored
7 years ago
by
Sergey Yakubov
Browse files
Options
Downloads
Patches
Plain Diff
update for macos
parent
6415ae7b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
common/cpp/src/system_io_linux.cpp
+10
-1
10 additions, 1 deletion
common/cpp/src/system_io_linux.cpp
tests/system_io/cleanup.sh
+1
-1
1 addition, 1 deletion
tests/system_io/cleanup.sh
worker/api/cpp/unittests/test_folder_broker.cpp
+2
-2
2 additions, 2 deletions
worker/api/cpp/unittests/test_folder_broker.cpp
with
13 additions
and
4 deletions
common/cpp/src/system_io_linux.cpp
+
10
−
1
View file @
977191ca
...
...
@@ -6,6 +6,8 @@
#include
<sys/stat.h>
#include
<algorithm>
#include
<errno.h>
using
std
::
string
;
using
std
::
vector
;
using
std
::
chrono
::
system_clock
;
...
...
@@ -48,8 +50,15 @@ system_clock::time_point GetTimePointFromFile(const string& fname, IOErrors* err
return
system_clock
::
time_point
{};
}
std
::
chrono
::
nanoseconds
d
=
std
::
chrono
::
nanoseconds
{
t_stat
.
st_mtim
.
tv_nsec
}
+
#ifdef __APPLE__
#define st_mtim st_mtimespec
#endif
std
::
chrono
::
nanoseconds
d
=
std
::
chrono
::
nanoseconds
{
t_stat
.
st_mtim
.
tv_nsec
}
+
std
::
chrono
::
seconds
{
t_stat
.
st_mtim
.
tv_sec
};
#ifdef __APPLE__
#undef st_mtim
#endif
return
system_clock
::
time_point
{
std
::
chrono
::
duration_cast
<
system_clock
::
duration
>
(
d
)};
}
...
...
This diff is collapsed.
Click to expand it.
tests/system_io/cleanup.sh
+
1
−
1
View file @
977191ca
#!/usr/bin/env bash
rm
-rf
test
rm
-rf
test_noaccess
rm
dir
test_noaccess
This diff is collapsed.
Click to expand it.
worker/api/cpp/unittests/test_folder_broker.cpp
+
2
−
2
View file @
977191ca
...
...
@@ -213,9 +213,9 @@ TEST_F(FolderDataBrokerTests, GetNextCallsOpenFileWithFileName) {
FileInfo
fi
;
FileData
data
;
auto
err
=
IOErrors
::
NO_ERROR
;
auto
err
=
IOErrors
::
NO_ERROR
;
EXPECT_CALL
(
mock
,
OpenFileToRead
(
"/path/to/file/1"
,
_
)).
WillOnce
(
DoAll
(
testing
::
SetArgPointee
<
1
>
(
IOErrors
::
NO_ERROR
),
testing
::
Return
(
1
)));
WillOnce
(
DoAll
(
testing
::
SetArgPointee
<
1
>
(
IOErrors
::
NO_ERROR
),
testing
::
Return
(
1
)));
data_broker
->
GetNext
(
&
fi
,
&
data
);
data_broker
->
io__
.
release
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment